SNOW-1844466: Support more aggregation functions in pivot methods.#2915
Merged
sfc-gh-mvashishtha merged 6 commits intomainfrom Jan 28, 2025
Conversation
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
…ation-functions-in-pivot-methods
sfc-gh-helmeleegy
approved these changes
Jan 28, 2025
Contributor
sfc-gh-helmeleegy
left a comment
There was a problem hiding this comment.
Looks good overall, just a few nits. Thanks, Mahesh!
Co-authored-by: Hazem Elmeleegy <hazem.elmeleegy@snowflake.com>
Co-authored-by: Hazem Elmeleegy <hazem.elmeleegy@snowflake.com>
sfc-gh-jjiao
approved these changes
Jan 28, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add support for aggregations
"count","median",np.median,"skew","std",np.std"var", andnp.varinpd.pivot_table(),DataFrame.pivot_table(), andpd.crosstab().Snowflake PIVOT now supports all those aggregations.
This commit also expands pivot and crosstab tests to include some aggregation functions we do not yet support due to Snowflake's PIVOT limitations.
Fixes SNOW-1844466