Skip to content

Conversation

@jiayuasu
Copy link
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

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

  • Yes, I have updated the documentation.

@jiayuasu jiayuasu requested a review from Copilot December 18, 2025 06:35
@jiayuasu jiayuasu marked this pull request as ready for review December 18, 2025 06:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and ST_Union_Agg as aliases for their _Aggr counterparts
  • Updated documentation to use the new _Agg naming 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.

@jiayuasu jiayuasu merged commit 2cc4331 into master Dec 18, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant