drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Phillips (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1393) Wrong result for query with Having filter, Order-by and Limit
Date Tue, 07 Oct 2014 20:36:34 GMT

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

Steven Phillips commented on DRILL-1393:
----------------------------------------

+1

> Wrong result for query with Having filter, Order-by and Limit
> -------------------------------------------------------------
>
>                 Key: DRILL-1393
>                 URL: https://issues.apache.org/jira/browse/DRILL-1393
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Operators
>    Affects Versions: 0.5.0
>            Reporter: Aman Sinha
>            Assignee: DrillCommitter
>         Attachments: DRILL-1393.patch
>
>
> The following query without LIMIT gives correct results: 
> 0: jdbc:drill:zk=local> select o_custkey from orders group by o_custkey having o_custkey
< 10 order by o_custkey;
> +------------+
> | o_custkey  |
> +------------+
> | 1          |
> | 2          |
> | 4          |
> | 5          |
> | 7          |
> | 8          |
> +------------+
> Adding a LIMIT gives 0 rows: 
> 0: jdbc:drill:zk=local> select o_custkey from orders group by o_custkey having o_custkey
< 10 order by o_custkey limit 10;
> +------------+
> | o_custkey  |
> +------------+
> +------------+
> No rows selected
> Here's the EXPLAIN plan:
> 0: jdbc:drill:zk=local> explain plan for select o_custkey from orders group by o_custkey
having o_custkey < 10 order by o_custkey limit 10;
> +------------+------------+
> |    text    |    json    |
> +------------+------------+
> | 00-00    Screen
> 00-01      SelectionVectorRemover
> 00-02        Limit(fetch=[10])
> 00-03          SelectionVectorRemover
> 00-04            TopN(limit=[10])
> 00-05              Filter(condition=[<($0, 10)])
> 00-06                HashAgg(group=[{0}])
> 00-07                  HashAgg(group=[{0}])
> 00-08                    Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath
[path=file:/Users/asinha/data/tpch-sf1/orders]], selectionRoot=/Users/asinha/data/tpch-sf1/orders,
columns=[SchemaPath [`o_custkey`]]]])



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

Mime
View raw message