generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 176
Pushdown case function in aggregations as range queries #4400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yuancu
wants to merge
32
commits into
opensearch-project:main
Choose a base branch
from
yuancu:issues/4201
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
0acdd51
WIP: implementing case range analyzer
yuancu 6afdcb6
Correct case analyzer
yuancu f416dee
Create bucket aggregation parsers that supports parsing nested sub ag…
yuancu cbcb25a
Fix unit tests
yuancu 7ec0684
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu 51813f0
Fix parsers to multi-range cases
yuancu 373e825
Update leaf bucket parser
yuancu f3830a5
Unit test case range analyzer
yuancu da5a9c5
Add explain ITs for pushing down case in aggregations
yuancu b46dd95
Update CaseRangeAnalyzerTest
yuancu 0660994
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu 0493629
Add a yaml test that replicates issue 4201
yuancu f690add
Add integration tests for case in aggregation
yuancu b204b2e
Fix unit tests
yuancu 4dc86db
Add a patch to CalcitePPLCaseFunctionIT
yuancu d38a916
Migrate all composite aggregation parser usage to bucket aggregate pa…
yuancu 6beed21
Create a parent abstract classes for BucketAggregationParsers
yuancu d40c244
Remove an unnecessary bucket agg in AggregationQueryBuilder
yuancu 606e346
Test pushing down case where there exists null values
yuancu a5fdd66
Return empty in CaseRangeAnalyzer to unblock the rest pushdown
yuancu fdb9886
Document limitations of pushding case as range queries
yuancu e4c5266
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu 7a8db58
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu 0ca81aa
Make case pushdown a private method
yuancu e701e57
Chores: remove unused helper method
yuancu 4968d1c
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu a22ae79
Unify logics for creating nested aggregations
yuancu 010fd06
Remove a note in condition.rst
yuancu 7d82cd8
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu 3b65b2d
Optmize range aggregation
yuancu 91aaee8
Ignore testNestedAggregationsExplain when pushdown is disabled
yuancu b8bb898
Merge remote-tracking branch 'origin/main' into issues/4201
yuancu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it's not a limitation of
case
function, it is just a restricted optimization. We can just call out in what case, thecase
function would be optimized to range DSL. Can we add some optimizablecase
usages in user doc?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the stated conditions are in the scope of restricted optimizations, but the limitations are not because we will still do the optimization regardless of whether it has null values in its column or whether there is a default NULL range.
The problem is that there is no way to know in advance whether there exists null values in a column. Therefore, if we do this optimization, we always risk the discrepancy in results of with & without push-down.