[GH-2547] Support *_Agg alias for *_Aggr functions#2564
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes aggregate geometry function naming by introducing _Agg aliases to replace the existing _Aggr suffix across Flink, Spark, and Snowflake implementations. The original _Aggr functions remain available but are deprecated to maintain backward compatibility.
Key changes:
- Added
ST_Envelope_Agg,ST_Intersection_Agg, andST_Union_Aggas aliases for their_Aggrcounterparts - Updated documentation to use the new
_Aggnaming convention with deprecation notices - Added comprehensive test coverage for the new aliases across all platforms
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| spark/common/src/main/scala/org/apache/spark/sql/sedona_sql/expressions/st_aggregates.scala | Added Scala DataFrame API aliases for the three aggregate functions |
| spark/common/src/main/scala/org/apache/sedona/sql/UDF/AbstractCatalog.scala | Registered _Agg aliases in Spark's function registry with proper cleanup |
| spark/common/src/test/scala/org/apache/sedona/sql/dataFrameAPITestScala.scala | Added DataFrame API tests validating the new aliases |
| spark/common/src/test/scala/org/apache/sedona/sql/aggregateFunctionTestScala.scala | Added SQL tests verifying alias behavior |
| snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/udtfs/*.java | Implemented three new UDTF classes for Snowflake aggregate functions |
| snowflake/src/main/java/org/apache/sedona/snowflake/snowsql/ddl/UDTFDDLGenerator.java | Registered new Snowflake UDTF classes |
| snowflake-tester/src/test/java/org/apache/sedona/snowflake/snowsql/TestTableFunctions.java | Added Snowflake-specific tests for the new functions |
| python/sedona/spark/sql/st_aggregates.py | Added Python wrapper functions with documentation |
| python/tests/sql/test_dataframe_api.py | Added Python DataFrame API test configurations |
| python/tests/sql/test_aggregate_functions.py | Added Python SQL tests for the aliases |
| flink/src/main/java/org/apache/sedona/flink/expressions/Aggregators.java | Implemented Flink aggregator classes extending the _Aggr versions |
| flink/src/main/java/org/apache/sedona/flink/Catalog.java | Registered Flink aggregator aliases |
| flink/src/test/java/org/apache/sedona/flink/AggregatorTest.java | Added Flink tests for the alias functions |
| docs/api/sql/AggregateFunction.md | Updated main SQL documentation to use _Agg naming |
| docs/api/snowflake/vector-data/AggregateFunction.md | Updated Snowflake documentation with new names and examples |
| docs/api/flink/Aggregator.md | Updated Flink documentation with new names and examples |
| common/src/test/java/org/apache/sedona/common/FunctionsTest.java | Fixed unrelated test assertion method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Kontinuation
pushed a commit
to Kontinuation/sedona
that referenced
this pull request
Jan 21, 2026
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?
Is this PR related to a ticket?
[GH-2547] my subject. Closing Support *_Agg alias for *_Aggr functions #2547What changes were proposed in this PR?
This pull request standardizes aggregate geometry function names by introducing _Agg aliases to replace _Aggr across Flink Spark and Snowflake. The original _Aggr functions are deprecated but remain available to preserve existing usage. Documentation and tests are updated to reflect and validate the new aliases.
Summary of changes
• Added _Agg aliases for ST_Envelope, ST_Intersection, and ST_Union across Flink Snowflake and Spark Python wrappers
• Marked _Aggr variants as deprecated while keeping them functional
• Updated SQL Flink and Snowflake docs to use _Agg and refreshed all examples
• Added Java and Python tests to ensure identical behavior between _Agg and _Aggr
• Cleaned up remaining documentation references for consistency
These updates improve API consistency and usability while maintaining compatibility with existing code.
How was this patch tested?
Passed existing unit tests and added new test cases
Did this PR include necessary documentation updates?