drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3219) Filter is not pushed into subquery with window function
Date Thu, 02 Jul 2015 18:33:04 GMT

    [ https://issues.apache.org/jira/browse/DRILL-3219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14612336#comment-14612336
] 

Jinfeng Ni commented on DRILL-3219:
-----------------------------------

The root cause of the this problem is similar to DRILL-3412. Basically, we do not have rules
to push either Project or Filter through the Window operator.  That's was caused the timing
of when Drill breaks a project with window function into Project and Window operator ( currently,
it just happened too early in the planning logic).



> Filter is not pushed into subquery  with window function
> --------------------------------------------------------
>
>                 Key: DRILL-3219
>                 URL: https://issues.apache.org/jira/browse/DRILL-3219
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.0.0
>            Reporter: Victoria Markman
>            Assignee: Jinfeng Ni
>              Labels: window_function
>             Fix For: 1.2.0
>
>
> {code}
> 0: jdbc:drill:schema=dfs> explain plan for select * from ( select a1, b1, c1, sum(a1)
over(partition by b1) from t1 ) where c1 is not null;
> +------+------+
> | text | json |
> +------+------+
> | 00-00    Screen
> 00-01      Project(a1=[$0], b1=[$1], c1=[$2], EXPR$3=[$3])
> 00-02        Project(a1=[$0], b1=[$1], c1=[$2], EXPR$3=[CASE(>($3, 0), CAST($4):ANY,
null)])
> 00-03          SelectionVectorRemover
> 00-04            Filter(condition=[IS NOT NULL($2)])
> 00-05              Window(window#0=[window(partition {1} order by [] range between UNBOUNDED
PRECEDING and UNBOUNDED FOLLOWING aggs [COUNT($0), $SUM0($0)])])
> 00-06                SelectionVectorRemover
> 00-07                  Sort(sort0=[$1], dir0=[ASC])
> 00-08                    Project(a1=[$2], b1=[$1], c1=[$0])
> 00-09                      Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath
[path=maprfs:///drill/testdata/subqueries/t1]], selectionRoot=/drill/testdata/subqueries/t1,
numFiles=1, columns=[`a1`, `b1`, `c1`]]])
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message