File tree Expand file tree Collapse file tree 3 files changed +52
-1
lines changed
spark-commons/src/main/scala-spark3.5-jvm/za/co/absa/spark/commons/adapters Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ lazy val sparkCommonsTest = (projectMatrix in file("spark-commons-test"))
6666 .settings(
6767 commonSettings ++ Seq (
6868 name := " spark-commons-test" ,
69- libraryDependencies ++= sparkDependencies(if (scalaVersion.value == scala211) spark2 else spark32 ),
69+ libraryDependencies ++= sparkDependencies(if (scalaVersion.value == scala211) spark2 else spark35 ),
7070 Compile / unmanagedSourceDirectories += {
7171 val sourceDir = (Compile / sourceDirectory).value
7272 if (scalaVersion.value.startsWith(" 2.13" )) {
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 ABSA Group Limited
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package za .co .absa .spark .commons .adapters
18+
19+ import org .apache .spark .sql .Column
20+ import org .apache .spark .sql .functions .{call_udf => sparkCallUdf }
21+
22+ trait CallUdfAdapter {
23+ def call_udf (udfName : String , cols : Column * ): Column = sparkCallUdf(udfName, cols:_* )
24+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2021 ABSA Group Limited
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package za .co .absa .spark .commons .adapters
18+
19+ import org .apache .spark .sql .Column
20+ import org .apache .spark .sql .functions .{transform => sparkTransform }
21+
22+ trait TransformAdapter {
23+ /**
24+ * For Spark versions prior 3.0.0, delegates to {{{hofs.transform()}}}
25+ */
26+ def transform : (Column , Column => Column ) => Column = sparkTransform
27+ }
You can’t perform that action at this time.
0 commit comments