-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[UT][BugFix] fix PullUpScanPredicateRule (backport #53740) #53838
Conversation
Cherry-pick of 8eff033 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
@mergify[bot]: Backport conflict, please reslove the conflict and resubmit the pr |
@mergify rebase |
☑️ Nothing to do
|
Signed-off-by: silverbullet233 <[email protected]> (cherry picked from commit 8eff033)
af2bbc8
to
7a2b551
Compare
Signed-off-by: silverbullet233 <[email protected]>
Quality Gate passedIssues Measures |
Why I'm doing:
What I'm doing:
Fixes https://github.com/StarRocks/StarRocksTest/issues/8896
Fix some bugs in
PullUpScanPredicateRule
:when there is a limit on ScanOperator, we need to extract the limit from ScanOperator to FilterOperator
for this problem, we cannot directly give up extracting related expressions from scan predicates, otherwise we will lose many opportunities to reuse expressions.
my solution: after extracting the reserved predicate in FilterOperator, we also need to collect the expressions that can be used for subfield column pruning, then add them to the scan projection and replace them with column ref in the final predicate.
taking this query as an example, before fixing, we need read the whole json column since json columns are in project node.
after fixing, only json_query(xx) in project node, we don't need read the whole column
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist: