You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (JIRA)" <ji...@apache.org> on 2018/04/29 21:22:00 UTC

[jira] [Resolved] (DRILL-2746) Filter is not pushed into subquery past UNION ALL

     [ https://issues.apache.org/jira/browse/DRILL-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vitalii Diravka resolved DRILL-2746.
------------------------------------
       Resolution: Done
    Fix Version/s:     (was: 1.1.0)
                   1.14.0

Resolved in DRILL-3855

> Filter is not pushed into subquery past UNION ALL
> -------------------------------------------------
>
>                 Key: DRILL-2746
>                 URL: https://issues.apache.org/jira/browse/DRILL-2746
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Query Planning &amp; Optimization
>    Affects Versions: 0.9.0
>            Reporter: Victoria Markman
>            Assignee: Vitalii Diravka
>            Priority: Major
>             Fix For: 1.14.0
>
>
> I expected to see filter pushed to at least left side of UNION ALL, instead it is applied after UNION ALL
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select * from (select a1, b1, c1 from t1 union all select a2, b2, c2 from t2 )  where a1 = 10;
> +------------+------------+
> |    text    |    json    |
> +------------+------------+
> | 00-00    Screen
> 00-01      Project(a1=[$0], b1=[$1], c1=[$2])
> 00-02        SelectionVectorRemover
> 00-03          Filter(condition=[=($0, 10)])
> 00-04            UnionAll(all=[true])
> 00-06              Project(a1=[$2], b1=[$1], c1=[$0])
> 00-08                Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t1]], selectionRoot=/drill/testdata/predicates/t1, numFiles=1, columns=[`a1`, `b1`, `c1`]]])
> 00-05              Project(a2=[$1], b2=[$0], c2=[$2])
> 00-07                Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/predicates/t2]], selectionRoot=/drill/testdata/predicates/t2, numFiles=1, columns=[`a2`, `b2`, `c2`]]])
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)