Skip to content

Commit a4f4c11

Browse files
committed
spark 3.5.5
1 parent 3fb4d4f commit a4f4c11

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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")) {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
}

0 commit comments

Comments
 (0)