Skip to content

Commit 37eec64

Browse files
committed
spark 3.4/3.5 compatibility issue with ProductEncoder
1 parent 0db290a commit 37eec64

File tree

1 file changed

+4
-0
lines changed
  • kotlin-spark-api/src/main/kotlin/org/jetbrains/kotlinx/spark/api

1 file changed

+4
-0
lines changed

Diff for: kotlin-spark-api/src/main/kotlin/org/jetbrains/kotlinx/spark/api/Encoding.kt

+4
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,9 @@ object KotlinTypeInference : Serializable {
532532
ProductEncoder<Any>(
533533
/* clsTag = */ ClassTag.apply(jClass),
534534
/* fields = */ params.asScalaSeq(),
535+
//#if sparkMinor >= 3.5
535536
/* outerPointerGetter = */ OuterScopes.getOuterScope(jClass).toOption(),
537+
//#endif
536538
)
537539
}
538540

@@ -558,7 +560,9 @@ object KotlinTypeInference : Serializable {
558560
ProductEncoder<Any>(
559561
/* clsTag = */ ClassTag.apply(jClass),
560562
/* fields = */ params.asScalaSeq(),
563+
//#if sparkMinor >= 3.5
561564
/* outerPointerGetter = */ OuterScopes.getOuterScope(jClass).toOption(),
565+
//#endif
562566
)
563567
}
564568

0 commit comments

Comments
 (0)