You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/03/22 10:03:15 UTC

(doris) branch branch-2.1 updated: [Fix](variant) filter with variant access may lead to to parition/tablet prune fall through (#32560) (#32680)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 38ce61da403 [Fix](variant) filter with variant access may lead to to parition/tablet prune fall through (#32560) (#32680)
38ce61da403 is described below

commit 38ce61da403afa084079a3c23b0b7522831c59c9
Author: lihangyu <15...@163.com>
AuthorDate: Fri Mar 22 18:03:08 2024 +0800

    [Fix](variant) filter with variant access may lead to to parition/tablet prune fall through (#32560) (#32680)
    
    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`#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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org