You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "simenojensen (via GitHub)" <gi...@apache.org> on 2026/10/19 06:29:30 UTC

[PR] [GH-3020] Add ST_H3ToCenterChild [sedona]

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

   ## 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?
   
   Related to #3020. Continues the incremental H3 hierarchy APIs from #3310, #3470, and #3474. This PR targets master independently of the compact implementation in #3480.
   
   ## What changes were proposed in this PR?
   
   Add `ST_H3ToCenterChild(cell, resolution)`, backed by the existing H3 `cellToCenterChild` API. It returns the center descendant at the requested resolution as a long cell ID. Equal resolutions return the input cell; coarser targets and resolutions outside 0–15 propagate H3 errors. Null cell or resolution arguments return null in Spark and Flink SQL.
   
   Expose the function through Spark SQL, the Scala and Python DataFrame APIs, and Flink SQL. Add Spark and Flink API pages and catalog entries for v2.0.0.
   
   Tests cover known center-child IDs, skipping resolutions, consistency between direct and intermediate traversal, pentagons, equal resolutions, boundary resolutions 0 and 15, invalid targets, literal and column null arguments, and all Scala/Python wrapper overloads.
   
   ## How was this patch tested?
   
   Validated locally with Java 17, Spark 3.5.0 / Scala 2.12, Flink 1.19.0, and Python 3.11:
   
   - `mvn -o spotless:apply` and `mvn -o spotless:check` — passed.
   - `mvn -o -pl common -am '-Dtest=org.apache.sedona.common.FunctionsTest#h3ToCenterChild*' -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.javadoc.skip=true install` — all 4 tests passed.
   - `mvn -o -pl spark/common -DskipTests test-compile` — production and test sources compiled.
   - `mvn -o -pl spark/common -Dsuites=org.apache.sedona.sql.functions.STH3Functions,org.apache.sedona.sql.dataFrameAPITestScala org.scalatest:scalatest-maven-plugin:2.2.0:test` — all 282 tests passed (17 H3 tests and 265 Scala DataFrame API tests).
   - `mvn -o -pl flink -Dtest=FunctionTest#testH3ToCenterChild test` — passed, including nullable arguments supplied through table columns.
   - `python -m pytest tests/sql/test_function.py tests/sql/test_dataframe_api.py -k test_st_h3_to_center_child -q` — both tests passed against the newly compiled JVM classes and Maven dependency classpath supplied through `SPARK_DIST_CLASSPATH`.
   - Black checks for all three modified Python files and `git diff --check` — passed.
   
   ## Did this PR include necessary documentation updates?
   
   Yes. Added Spark SQL and Flink function pages and updated both API catalogs, using the current SNAPSHOT version `v2.0.0`.
   


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [GH-3020] Add ST_H3ToCenterChild [sedona]

Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #3481:
URL: https://github.com/apache/sedona/pull/3481


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org