jiayuasu opened a new pull request, #3062: URL: https://github.com/apache/sedona/pull/3062
## Did you read the Contributor Guide? - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) ## Is this PR related to a ticket? - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #3061. ## What changes were proposed in this PR? This is the second step toward Geography type support in SedonaFlink (#3054), building on the `GeographyTypeSerializer` added in #3058. It exposes the geography constructor/conversion functions to the Flink Table API / SQL, reaching parity with the 9 functions Spark already provides: - `ST_GeogFromWKT` (wkt, [srid]) - `ST_GeogFromText` (wkt, [srid]) - `ST_GeogFromEWKT` (ewkt) - `ST_GeogCollFromText` (wkt, [srid]) - `ST_GeogFromWKB` (wkb, [srid]) - `ST_GeogFromEWKB` (wkb) - `ST_GeogFromGeoHash` (geohash, [precision]) - `ST_GeogToGeometry` (geography) → geometry - `ST_GeomToGeography` (geometry) → geography Each is a `ScalarFunction` wrapper in a new `expressions/GeographyConstructors.java` (mirroring the dedicated geography package on the Spark side), delegating to `org.apache.sedona.common.geography.Constructors` with `@DataTypeHint(value = "RAW", rawSerializer = GeographyTypeSerializer.class, bridgedTo = Geography.class)`. Optional-argument defaults match Spark (srid `0`, geohash precision `null`). All 9 are registered in `Catalog.java`. ## How was this patch tested? Added `GeographyConstructorTest` (10 tests), exercising every function end-to-end through the Flink Table API — including geography↔geometry conversion round-trips. Because `SedonaContext.create` registers `Catalog.getFuncs()` as temporary system functions, the tests also verify the Catalog registration. `mvn -pl flink test -Dtest=GeographyConstructorTest` passes (10/10), and `ModuleTest` remains green. ## Did this PR include necessary documentation updates? - No, this PR does not affect the documentation directly. The SedonaFlink geography function docs are tracked as the next sub-task of #3054. -- 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]
