Kotlin / kotlin-spark-api

This projects gives Kotlin bindings and several extensions for Apache Spark. We are looking to have this as a part of Apache Spark 3.x
Apache License 2.0
456 stars 34 forks source link

JavaCoverters for Scala data types can be replaced with CollectionConverters #148

Closed pihanya closed 2 years ago

pihanya commented 2 years ago

https://github.com/JetBrains/kotlin-spark-api/blob/d62e3afe115c943bacd386fba28d0a13af660582/kotlin-spark-api/3.2/src/main/kotlin/org/jetbrains/kotlinx/spark/api/Conversions.kt#L28-L167

JavaConverters is partially deprecated in Scala 2.13.8: https://github.com/scala/scala/blob/2.13.x/src/library/scala/collection/JavaConverters.scala#L78-L139

... so I suggest using methods from scala.jdk.javaapi.CollectionConverters. I am attaching a file (Conversions.kt.txt) that you can use to replace usage of deprecated methods with actual ones.

asm0dey commented 2 years ago

@Pihanya mind creating a PR?

pihanya commented 2 years ago

@asm0dey, ok, I will create PR this week. I have ready code that getting work done. There's just a need to transfer it here.

Jolanrensen commented 2 years ago

Creating a scala-independent version of the conversions file at https://github.com/Kotlin/kotlin-spark-api/pull/175 uses JCP for the compatibility

Jolanrensen commented 2 years ago

merged for 1.2.0