Skip to content

Commit 96f0440

Browse files
committed
hotfix for #152
1 parent c8c702e commit 96f0440

File tree

1 file changed

+2
-2
lines changed
  • examples/src/main/kotlin/org/jetbrains/kotlinx/spark/examples

1 file changed

+2
-2
lines changed

examples/src/main/kotlin/org/jetbrains/kotlinx/spark/examples/UDFs.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import org.apache.spark.sql.functions.*
2525
import org.jetbrains.kotlinx.spark.api.*
2626
import org.jetbrains.kotlinx.spark.api.tuples.*
2727
import scala.Tuple2
28-
import scala.collection.mutable.WrappedArray
28+
import scala.collection.Seq
2929

3030

3131
fun main() {
@@ -203,7 +203,7 @@ private fun strongTypingInDatasets() = withSpark {
203203
// advantage of!
204204

205205
// NOTE: In UDFs, iterables, lists, arrays and such need to be represented as WrappedArray
206-
val toJson by udf { age: Int, name: String, pets: WrappedArray<String> ->
206+
val toJson by udf { age: Int, name: String, pets: Seq<String> ->
207207
"""{ "age" : $age, "name" : "$name", "pets" : [${pets.asKotlinIterable().joinToString { "\"$it\"" }}] }"""
208208
}
209209

0 commit comments

Comments
 (0)