feat(parser): ClickHouse parametric aggregates (#482)#487
feat(parser): ClickHouse parametric aggregates (#482)#487ajitpratap0 wants to merge 6 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ajitpratap0's task —— View job PR Review: ClickHouse Parametric AggregatesReviewed this PR for code quality, potential issues, performance, security, and test coverage. Review Findings✅ Strengths
❌ Critical Issue: Missing Parameters in AST TraversalFile: The func (f FunctionCall) Children() []Node {
children := nodifyExpressions(f.Arguments) // Only Arguments, missing Parameters!
if f.Over != nil {
children = append(children, f.Over)
}
// ... rest of method
}Required Fix: Add Parameters to the Children method: func (f FunctionCall) Children() []Node {
children := nodifyExpressions(f.Arguments)
children = append(children, nodifyExpressions(f.Parameters)...) // Add this line
if f.Over != nil {
children = append(children, f.Over)
}
// ... rest stays the same
}
|
|
Claude finished @ajitpratap0's task —— View job PR Review: ClickHouse Parametric AggregatesReviewed this PR for code quality, potential issues, performance, security, and test coverage. Todo List
Review Findings✅ Strengths
✅ Code Quality & Implementation
✅ Performance Considerations
✅ Security Assessment
✅ Test Coverage AnalysisThe test suite is comprehensive:
🔧 Minor Recommendations
SummaryThis is a high-quality implementation that correctly adds ClickHouse parametric aggregate support. The previous automated review incorrectly flagged the AST traversal issue - the code properly includes Parameters in the Recommendation: ✅ Approve - This PR is ready to merge. |
|
Claude finished @ajitpratap0's task —— View job PR Review: ClickHouse Parametric Aggregates
|
|
Claude finished @ajitpratap0's task —— View job PR Review: ClickHouse Parametric AggregatesReviewing this PR for code quality, potential issues, performance, security, and test coverage. Todo List
Review SummaryThis is a well-implemented feature that adds ClickHouse parametric aggregate support to the SQL parser. The implementation correctly handles the ✅ Strengths
✅ Security & Performance Assessment
✅ Architecture Compliance
🔧 Minor Suggestions (Optional improvements)
📋 Technical Details Verified
Final Recommendation✅ APPROVE - This PR is well-designed, thoroughly tested, and ready for merge. The implementation correctly adds ClickHouse parametric aggregate support while maintaining code quality standards and following established project patterns. |
|
Claude finished @ajitpratap0's task —— View job PR Review: ClickHouse Parametric AggregatesConducting a comprehensive code review of this PR that adds support for ClickHouse parametric aggregates. Todo List
Review SummaryThis is a well-implemented feature that adds ClickHouse parametric aggregate support to the SQL parser. The implementation correctly handles the ✅ Strengths
✅ Security & Performance Assessment
✅ Architecture Compliance
🔧 Minor Suggestions (Optional improvements)
📋 Technical Details Verified
Final Recommendation✅ APPROVE - This PR is well-designed, thoroughly tested, and ready for merge. The implementation correctly adds ClickHouse parametric aggregate support while maintaining code quality standards and following established project patterns. |
…etric-aggregates-482 # Conflicts: # pkg/sql/ast/ast.go # pkg/sql/parser/window.go
|
Claude finished @ajitpratap0's task —— View job PR Review: ClickHouse Parametric AggregatesConducting a comprehensive code review of this PR that adds support for ClickHouse parametric aggregates. Todo List
Review SummaryThis is a well-implemented feature that adds ClickHouse parametric aggregate support to the SQL parser. The implementation correctly handles the ✅ Strengths
✅ Security & Performance Assessment
✅ Architecture Compliance
🔧 Minor Suggestions (Optional improvements)
📋 Technical Details Verified
Final Recommendation✅ APPROVE - This PR is well-designed, thoroughly tested, and ready for merge. The implementation correctly adds ClickHouse parametric aggregate support while maintaining code quality standards and following established project patterns. |

Summary
ClickHouse aggregate functions can take parameters before their arguments — `quantileTDigest(0.95)(value)`, `topK(10)(name)`, `quantiles(0.5, 0.9, 0.99)(latency_ms)`. The first paren group is parameters; the second is arguments.
Test plan
Part of #482.
🤖 Generated with Claude Code