-
Notifications
You must be signed in to change notification settings - Fork 28.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-47443][SQL] Window Aggregate support for collations
### What changes were proposed in this pull request? This PR introduces support for Window Aggregates when partitioning is done against expressions with non-binary collation. The approach is same as for regular aggregates. Instead of doing byte-for-byte comparison against `UnsafeRow` we fall back to interpreted mode if there is a data type in grouping expressions that doesn't satisfy `isBinaryStable` constraint. ### Why are the changes needed? Previous implementation returned invalid results. ### Does this PR introduce _any_ user-facing change? yes - fixes incorrect behavior. ### How was this patch tested? New test is added in `CollationSuite`. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45568 from dbatomic/win_agg_support_for_collations. Authored-by: Aleksandar Tomic <aleksandar.tomic@databricks.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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