File tree Expand file tree Collapse file tree 2 files changed +293
-124
lines changed
core/src/main/scala/org/jetbrains/kotlinx/spark/extensions
kotlin-spark-api/src/main/kotlin/org/jetbrains/kotlinx/spark/api Expand file tree Collapse file tree 2 files changed +293
-124
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import org.apache.spark.SparkContext
23
23
import org .apache .spark .sql ._
24
24
25
25
import java .util
26
- import scala .collection .JavaConverters
27
26
28
27
object KSparkExtensions {
29
28
@@ -39,7 +38,13 @@ object KSparkExtensions {
39
38
40
39
def lit (literal : Any ): Column = functions.lit(literal)
41
40
42
- def collectAsList [T ](ds : Dataset [T ]): util.List [T ] = JavaConverters .seqAsJavaList(ds.collect())
41
+ def collectAsList [T ](ds : Dataset [T ]): util.List [T ] = {
42
+ // #if scalaCompat >= 2.13
43
+ scala.jdk.javaapi.CollectionConverters .asJava(ds.collect())
44
+ // #else
45
+ // $scala.collection.JavaConverters.seqAsJavaList(ds.collect())
46
+ // #endif
47
+ }
43
48
44
49
45
50
def debugCodegen (df : Dataset [_]): Unit = {
You can’t perform that action at this time.
0 commit comments