jiayuasu opened a new pull request, #2628:
URL: https://github.com/apache/sedona/pull/2628

   ## What changes were proposed in this pull request?
   
   Implements #908: Adds two geohash neighbor functions across all platforms:
   
   - **ST_GeoHashNeighbors(geohash)**: Returns an array of 8 neighboring 
geohash cells (N, NE, E, SE, S, SW, W, NW)
   - **ST_GeoHashNeighbor(geohash, direction)**: Returns a single neighbor in 
the given direction (n, ne, e, se, s, sw, w, nw, case-insensitive)
   
   Algorithm ported from geohash-java (Apache 2.0 license).
   
   ### Changes
   
   - **GeoHashUtils.java** (new): Shared base32 constants and decode lookup, 
eliminating duplication across GeoHashDecoder, PointGeoHashEncoder, and 
GeoHashNeighbor
   - **GeoHashNeighbor.java** (new): Core neighbor computation using 
bit-interleaving approach
   - **GeoHashDecoder.java**, **PointGeoHashEncoder.java**: Refactored to use 
shared GeoHashUtils constants
   - **InferredExpression.scala**: Added Array[String] type support for Spark 
SQL
   - **Spark**: Registered in Catalog, Functions, st_functions
   - **Flink**: Registered in Catalog, Functions with @DataTypeHint
   - **Snowflake**: Registered in UDFs and UDFsV2
   - **Python**: Added to st_functions.py
   - **Tests**: Common unit tests (9), Spark SQL tests, Flink tests, Snowflake 
tests
   - **Docs**: Spark, Flink, Snowflake API documentation
   
   ## How was this patch tested?
   
   - 9 common unit tests covering known values, all 8 neighbors, circular 
movement, case insensitivity, null/empty/invalid inputs
   - Spark SQL functional tests
   - Flink SQL functional tests
   - Snowflake tester tests (TestFunctions + TestFunctionsV2)
   - All modules compile successfully
   


-- 
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