[Fix](variant) filter with variant access may lead to to parition/tab…#32680
Merged
yiguolei merged 1 commit intoapache:branch-2.1from Mar 22, 2024
Merged
[Fix](variant) filter with variant access may lead to to parition/tab…#32680yiguolei merged 1 commit intoapache:branch-2.1from
yiguolei merged 1 commit intoapache:branch-2.1from
Conversation
…let prune fall through (apache#32560) Query like `select * from ut_p partitions(p2) where cast(var['a'] as int) > 0` will fall through parition/tablet prunning since it's plan like ``` mysql> explain analyzed plan select * from ut_p where id = 3 and cast(var['a'] as int) = 789; +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Explain String(Nereids Planner) | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | LogicalResultSink[26] ( outputExprs=[id#0, var#1] ) | | +--LogicalProject[25] ( distinct=false, projects=[id#0, var#1], excepts=[] ) | | +--LogicalFilter[24] ( predicates=((cast(var#4 as INT) = 789) AND (id#0 = 3)) ) | | +--LogicalFilter[23] ( predicates=(0 = __DORIS_DELETE_SIGN__#2) ) | | +--LogicalProject[22] ( distinct=false, projects=[id#0, var#1, __DORIS_DELETE_SIGN__#2, __DORIS_VERSION_COL__#3, element_at(var#1, 'a') AS `var`apache#4], excepts=[] ) | | +--LogicalOlapScan ( qualified=regression_test_variant_p0.ut_p, indexName=<index_not_selected>, selectedIndexId=10145, preAgg=ON ) | +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 6 rows in set (0.01 sec) ``` with an extra LogicalProject on top of LogicalOlapScan, so we should handle such case to prune parition/tablet
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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.
…let prune fall through (#32560)
Query like
select * from ut_p partitions(p2) where cast(var['a'] as int) > 0will fall through parition/tablet prunning since it's plan likewith an extra LogicalProject on top of LogicalOlapScan, so we should handle such case to prune parition/tablet
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...