-
Couldn't load subscription status.
- Fork 176
Support aggregation push down with scripts #3916
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
Support aggregation push down with scripts #3916
Conversation
Signed-off-by: Heng Qian <qianheng@amazon.com>
|
CI failed because of the sort push down after aggregation is implemented improperly. Per v2's implementation, we should push down sort's collation into the inner of AggregationBuilder instead of the outer For instance, when do push down for PPL In Calcite, it will build SearchRequest like below: And then cause exception: |
Signed-off-by: Heng Qian <qianheng@amazon.com>
Fixed by the lasted commit. The correct DSL should be: |
Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Ignore q30 because of too many scripts push down, which will then trigger ResourceMonitor restriction. This query will produce 89 scripts if push down enabled. It should be addressed in a separate PR by merging multi-scripts or preventing such script push down. As said in this comments #3859 (comment), filter script push down may trigger similar issue if filter conditions produce too many scripts |
Could u explain more about restriction? I try a more complex one, it works |
|
|
||
| /** Ignore queries that are not supported by Calcite. */ | ||
| /** | ||
| * Ignore queries that are not supported by Calcite. Ignore q33 because of too much script push |
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.
q33 -> q30
Single q30 query can run successfully as well on my local test. It won't always trigger that exception. As seen in the CI before ignoring q30, https://github.com/opensearch-project/sql/actions/runs/16497630130/job/46647212530, some tests can pass while others failed with exception. I think it depends on the tension of the node on the specific point, maybe impacted by JVM GC. |
Signed-off-by: Heng Qian <qianheng@amazon.com>
Script push down will trigger exception. We can track the solution in seperate PR. |
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.19-dev 2.19-dev
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.19-dev
# Create a new branch
git switch --create backport/backport-3916-to-2.19-dev
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b0c07008f8e5a6401f350da142e65fce649c7e60
# Push it to GitHub
git push --set-upstream origin backport/backport-3916-to-2.19-dev
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.19-devThen, create a pull request where the |
* Support aggregation push down with scripts Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix IT Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix sort push down after aggregation Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix IT Signed-off-by: Heng Qian <qianheng@amazon.com> * Ignore q33 in clickbench because of ResourceMonitor restriction Signed-off-by: Heng Qian <qianheng@amazon.com> * Correct ignored query name in the comment - from q33 to q30 Signed-off-by: Heng Qian <qianheng@amazon.com> --------- Signed-off-by: Heng Qian <qianheng@amazon.com> (cherry picked from commit b0c0700)
#3926) * Support aggregation push down with scripts (#3916) * Support aggregation push down with scripts Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix IT Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix sort push down after aggregation Signed-off-by: Heng Qian <qianheng@amazon.com> * Fix IT Signed-off-by: Heng Qian <qianheng@amazon.com> * Ignore q33 in clickbench because of ResourceMonitor restriction Signed-off-by: Heng Qian <qianheng@amazon.com> * Correct ignored query name in the comment - from q33 to q30 Signed-off-by: Heng Qian <qianheng@amazon.com> --------- Signed-off-by: Heng Qian <qianheng@amazon.com> (cherry picked from commit b0c0700) * Change java style to 11 Signed-off-by: Heng Qian <qianheng@amazon.com> --------- Signed-off-by: Heng Qian <qianheng@amazon.com>
Description
Related Issues
Resolves
#3386
#3385
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.