You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/11/17 02:11:33 UTC

[jira] [Resolved] (DRILL-1362) Count(nullable-column) is incorrectly pushed into group scan operator

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

Jacques Nadeau resolved DRILL-1362.
-----------------------------------
    Resolution: Fixed

> Count(nullable-column) is incorrectly pushed into group scan operator
> ---------------------------------------------------------------------
>
>                 Key: DRILL-1362
>                 URL: https://issues.apache.org/jira/browse/DRILL-1362
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Operators
>    Affects Versions: 0.4.0
>            Reporter: Aman Sinha
>             Fix For: 0.7.0
>
>
> The following query on TPC-DS table web_returns produces wrong result because the aggregate count(wr_return_quantity) gets pushed into the parquet group scan operator even though wr_return_quantity is nullable and apparently the parquet metadata does not have stats on nullable column.  
> 0: jdbc:drill:zk=local> select count(wr_return_quantity) from web_returns;
> +------------+
> |   EXPR$0   |
> +------------+
> | 71763      |
> +------------+
> 0: jdbc:drill:zk=local> explain plan for select count(wr_return_quantity) from web_returns;
> {code:sql}
> +------------+------------+
> |    text    |    json    |
> +------------+------------+
> | 00-00    Screen
> 00-01      Project(EXPR$0=[$0])
> 00-02        Scan(groupscan=[org.apache.drill.exec.store.pojo.PojoRecordReader@e4acaad])
> {code}
> For reference, here are the correct results:  
> tpcds=# select count(wr_return_quantity) from web_returns;
>  count
> -------
>  68616
> (1 row)
> tpcds=# select count(*) from web_returns;
>  count
> -------
>  71763
> (1 row)



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