feat(sql): add arg_min() and arg_max() aggregate functions#6652
feat(sql): add arg_min() and arg_max() aggregate functions#6652bluestreak01 merged 1 commit intomasterfrom
Conversation
WalkthroughThis pull request introduces 24 new group-by aggregate functions: 12 arg_max variants and 12 arg_min variants, each supporting different type combinations (Double, Long, Timestamp, UUID). Each function includes a factory class and comprehensive test suite. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
[PR Coverage check]😍 pass : 884 / 904 (97.79%) file detail
|
Summary
Implements
arg_min(value, key)andarg_max(value, key)aggregate functions that return the value of the first argument at the minimum/maximum value of the second argument. These are commonly used analytics functions for finding values at extreme points.Supported type combinations (18 total):
arg_max(DD)arg_max(DN)arg_max(ND)arg_max(LD)arg_max(DL)arg_max(LN)arg_max(NL)arg_max(ZN)arg_max(NZ)arg_min(DD)arg_min(DN)arg_min(ND)arg_min(LD)arg_min(DL)arg_min(LN)arg_min(NL)arg_min(ZN)arg_min(NZ)Key features:
Test plan
🤖 Generated with Claude Code