Repository navigation
[GH-3124] Prepare shared Spark sources and spatial boundaries - #3525
Merged
jiayuasu merged 7 commits intoNov 10, 2026
Merged
Conversation
This was referenced Nov 7, 2026
Move the existing parser unchanged into the shared Spark 4.1 source root. Keep compilation and Scalastyle in the version module, and remove the obsolete common-module Spotless include.
jiayuasu
marked this pull request as ready for review
November 10, 2026 09:03
Use scala-spatial-udt and the matching default build selector. The default UDT implementation remains supported on older Spark versions.
jiayuasu
added a commit
to jiayuasu/sedona
that referenced
this pull request
Nov 10, 2026
Record master eaca763 after the squash merge of apache#3525. Its complete preparation delta matches ec6166d, which is already integrated here. Preserve the validated native tree and its Spark 4.2 adaptations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did you read the Contributor Guide?
Yes, I have read the Contributor Rules and Contributor Development Guide.
Is this PR related to a ticket?
Related to #3124. Consolidated preparation for #3391. This PR includes the source-sharing changes from #3526 and shared-result test changes from #3531; those PRs are superseded by this one.
What changes were proposed in this PR?
Prepare the existing Spark implementation for the native spatial boundary in one reviewable change:
Adapter,StructuredAdapter, andDfUtilsbehind the version-selectedSpatialTypeSupportimplementation. The selected implementation retains existing GeometryUDT schemas and JTS values. Itsscala-spatial-udtsource set names the supported Sedona UDT implementation explicitly.spark/shared/src/main/scala-spark-4across Spark 4.0 and 4.1, removing the duplicate Spark 4.0 copies. Share the unchanged Spark 4.1 parser fromspark/shared/src/main/scala-spark-4.1while retaining ownership in the version-specific module. Spark 4.2 can reuse both source roots.SpatialTestValuesandtoGeometrySeq, preserving the existing values, layouts and test coverage.The build, Spotless and Scalastyle configuration includes the shared source roots. The parser and
SpatialTypeSupportbehavior are unchanged. This does not enable native types or change SQL, RDD/index, or S2 serialization. The SQL ISO WKB migration remains in #3528.How was this patch tested?
Previous-head validation at
c92a66fa331c5791c0bce86098eb34783305ebdcused clean shaded builds and focused suites on Spark 3.5.8/Scala 2.12 and Spark 4.1.1/Scala 2.13:mvn -B -pl spark-shaded -am -Dspark=<3.5|4.1> -Dspark.version=<3.5.8|4.1.1> -Dscala=<2.12|2.13> -DskipTests clean installpassed for both profiles.mvn -B -pl spark/common ... -Dtest=adapterTestJava -Dsuites=<SpatialAdapterBoundaryTest,adapterTestScala,structuredAdapterTestScala,SpatialTestValuesTest,functionTestScala,predicateJoinTestScala,BroadcastIndexJoinSuite> verifyand version-moduleSQLSyntaxTestScala,Box2DCastSuite,Box3DCastSuite,StrategySuitepassed for both profiles.git diff --checkpassed at that head.Those 788 passing checks describe the preceding preparation head. The three shared Arrow sources preserve their original bytes; source inspection confirms one copy of each class in each Spark 4.0/4.1 build and unchanged parser and
SpatialTypeSupportsources.Previous-head validation at
a6640a89a37449df6e37be3332be4edb170cdc08: clean shaded packaging passed on Spark 4.0.2 and 4.1.1 / Scala 2.13. Spark 4.0.2 passed 18 version-module JVM tests and 14 Python Arrow tests; Spark 4.1.1 passed 11 JVM tests and 14 Python Arrow tests, with the same seven parser-option assumptions canceled. Both jars contain exactly one copy of each relocated class and companion, and runtime-loaded class origins and bytes match the freshly built artifacts. Spotless, Scalastyle, repository commit hooks andgit diff --checkpassed. All applicable CI at that previous head passed, including the JVM matrix, Python matrix, wheel builds, PyFlink and pre-commit. Exact commands and reports are retained outside the repository.Previous-head parser relocation validation at
61a757ae910b70f2b3b7b60347b64ab4ca253bea: a clean Spark 4.1.1/Scala 2.13 shaded reactor install andspark/spark-4.1 verifypassed all 18 version-module tests, with no cancellations. The parser source is byte-identical before and after the move. Packaged-runtime probes verified parsing and internal execution with the extension enabled; parser/helper classes occur once in the version and shaded artifacts, are absent from the common artifact, and loaded class origins and bytes match the fresh jar. Spotless, Scalastyle, normal commit hooks andgit diff --checkpassed. The prior Arrow/shared-suite results above were not rerun for this source-only move. All 42 applicable checks at that previous head passed, including the JVM and Python matrices. Only the release-onlyupload_pypijob was intentionally skipped.Current-head UDT naming validation at
ec6166d2c8ece85a2052d4d43f4474c1c42bc08c: clean Spark 4.1.1/Scala 2.13 shaded packaging and all fiveSpatialAdapterBoundaryTestcases passed using the defaultudtselector. The moved Scala source is byte-identical; the common and shaded jars each contain exactly one matchingSpatialTypeSupportclass and companion. Compilation, Spotless, Scalastyle, normal commit hooks and whitespace checks passed. Fresh CI is pending.Did this PR include necessary documentation updates?
No public behavior or API change. The boundary and shared source configuration are documented in code; the public native migration guide belongs to #3391.