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

Abhishek Girish commented on DRILL-3412:
----------------------------------------

I'm seeing a ChannelClosedException with the same RANK() window function query. 

> SELECT RANK() OVER (PARTITION BY ss.ss_store_sk ORDER BY ss.ss_store_sk)  
> FROM store_sales ss WHERE ss.ss_store_sk is not NULL LIMIT 20;
java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR: 
ChannelClosedException
Fragment 3:17
[Error Id: b78b4931-da1d-4669-af09-ee1be3636421 on abhi7.qa.lab:31010]
at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73)
at 
sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:85)
at sqlline.TableOutputFormat.print(TableOutputFormat.java:116)
at sqlline.SqlLine.print(SqlLine.java:1583)
at sqlline.Commands.execute(Commands.java:852)
at sqlline.Commands.sql(Commands.java:751)
at sqlline.SqlLine.dispatch(SqlLine.java:738)
at sqlline.SqlLine.begin(SqlLine.java:612)
at sqlline.SqlLine.start(SqlLine.java:366)
at sqlline.SqlLine.main(SqlLine.java:259)

Drill Git.CommitID: 60bc945 (Jun 26)

> Projections are not getting push down below Window operator
> -----------------------------------------------------------
>
>                 Key: DRILL-3412
>                 URL: https://issues.apache.org/jira/browse/DRILL-3412
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Aman Sinha
>            Assignee: Jinfeng Ni
>
> The plan below shows that the 'star' column is being produced by the Scan and 
> subsequent Project.  This indicates projection pushdown is not working as 
> desired when window function is present.  The query produces correct results.
> {code}
> explain plan for select min(n_nationkey) over (partition by n_regionkey) from 
> cp.`tpch/nation.parquet` ;
> 00-00    Screen
> 00-01      Project(EXPR$0=[$0])
> 00-02        Project(w0$o0=[$3])
> 00-03          Window(window#0=[window(partition {2} order by [] range 
> between UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING aggs [MIN($1)])])
> 00-04            SelectionVectorRemover
> 00-05              Sort(sort0=[$2], dir0=[ASC])
> 00-06                Project(T1¦¦*=[$0], n_nationkey=[$1], n_regionkey=[$2])
> 00-07                  Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=classpath:/tpch/nation.parquet]], 
> selectionRoot=/tpch/nation.parquet, numFiles=1, columns=[`*`]]])
> {code}



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

Reply via email to