joshmanis618-stack opened a new pull request, #3211:
URL: https://github.com/apache/sedona/pull/3211

   ## Summary
   
   Fixes the two API breaks that block Sedona's `flink` module from 
compiling/running against Flink 2.x, and adds an opt-in `sedona-flink-2.2` 
profile so both lines are tested in CI.
   
   - **Kryo registration**: `ExecutionConfig.registerTypeWithKryoSerializer` 
was removed in Flink 2.x; registration moved to `SerializerConfigImpl` via 
`getSerializerConfig()`.
   - **TypeSerializerSnapshot signature change**: `resolveSchemaCompatibility` 
now takes a `TypeSerializerSnapshot<T>` instead of a `TypeSerializer<T>`. Fixed 
across all six type serializers (`Geometry`, `Geometry[]`, `Box2D`, `Box3D`, 
`Geography`, and a new `GeometryDoublePairTypeSerializer`).
   - **`ST_MinimumBoundingRadius`**: its bare `@DataTypeHint(value = "RAW")` 
relied on Flink auto-deriving a Kryo serializer for `Pair<Geometry, Double>`, 
which throws under Flink 2.2.1. Added an explicit 
`GeometryDoublePairTypeSerializer`, matching how every other RAW hint in 
`Functions.java` already avoids auto-derivation.
   - Added a `sedona-flink-2.2` Maven profile (`-Dflink=2.2 -Dscala=2.12`), 
mirroring the existing `sedona-spark-*` version-profile convention, pinning 
`flink.version` to 2.2.1.
   - Added a Flink 2.2.1 row to the `java.yml` CI matrix and updated 
`docs/setup/flink/platform.md`.
   
   ## Why this doesn't need to wait for a breaking/2.0 release
   
   When I filed #3053 I expected this to require migrating off legacy 
`SourceFunction`/`SinkFunction` (removed in Flink 2.0) and moving to unsuffixed 
Flink 2.x table artifacts. Neither turned out to be necessary in practice:
   
   - The `flink` module doesn't use `SourceFunction`/`SinkFunction` anywhere.
   - `flink-table-planner_2.12` is still published for Flink 2.2.1, so the 
existing Scala-suffixed artifact naming keeps working unchanged.
   
   The actual break was narrower: just the two API changes above. **This PR is 
purely additive** — Flink 1.19 remains the default and is unaffected; 
`-Dflink=2.2 -Dflink.version=2.2.1` is opt-in. Since no existing behavior 
changes, I don't think this needs to wait for a breaking Sedona 2.0 release — 
happy to target the upcoming 1.9.1 if that works for you.
   
   ## Testing
   
   Full `flink`/`flink-shaded` test suite (331 tests, 0 failures/errors) passes 
against both:
   - Default Flink 1.19.0
   - `-Dflink=2.2 -Dscala=2.12 -Dflink.version=2.2.1`
   
   `mvn spotless:apply` run before submitting.
   
   Closes #3053
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to