Add window function (OVER clause) and CTE (WITH clause) execution lay…#593
Closed
jeffreyaven wants to merge 6 commits intomainfrom
Closed
Add window function (OVER clause) and CTE (WITH clause) execution lay…#593jeffreyaven wants to merge 6 commits intomainfrom
jeffreyaven wants to merge 6 commits intomainfrom
Conversation
…er support - Update go.mod with replace directive for new parser commit (1595204710ca) which includes window function and CTE parsing support - Add window function handling in parser_util.go: functions with OVER clause are now marked as IsAggregateExpr = true - Add CTE support in ast_expand.go: - Added cteRegistry field to track registered CTEs - Process CTEs in SELECT statements before other elements - CTE references in FROM clause skip provider/view lookup - Add tests for window functions (ROW_NUMBER, SUM, RANK, etc.) - Add tests for CTE parsing and registry functionality
The replace directive for the new parser version requires go.sum to be updated with the new dependency hashes. Adding go mod tidy before running golangci-lint ensures the dependencies are resolved.
- Add window function test queries (ROW_NUMBER, RANK, SUM with OVER clause) - Add CTE test queries (simple, with aggregation, multiple CTEs) - Add expected output files for all test cases - Add integration tests using mocked Google Compute Disks provider Test coverage: - Window ROW_NUMBER() OVER (ORDER BY name) - Window RANK() OVER (ORDER BY sizeGb) - Window SUM() OVER (ORDER BY name) for running totals - Simple CTE with SELECT from CTE - CTE with COUNT(*) aggregation - Multiple CTEs with UNION ALL
Member
Author
|
closed in lieu of #594 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…er support
Description
Type of change
Issues referenced.
Evidence
Checklist:
Variations
Tech Debt