You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/08/02 23:16:00 UTC

[jira] [Commented] (DRILL-6654) Data verification failure with lateral unnest query having filter in and order by

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

ASF GitHub Bot commented on DRILL-6654:
---------------------------------------

sohami opened a new pull request #1418: DRILL-6654: Data verification failure with lateral unnest query havin…
URL: https://github.com/apache/drill/pull/1418
 
 
   …g filter in and order by

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Data verification failure with lateral unnest query having filter in and order by
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-6654
>                 URL: https://issues.apache.org/jira/browse/DRILL-6654
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.14.0
>            Reporter: Kedar Sankar Behera
>            Assignee: Sorabh Hamirwasia
>            Priority: Major
>             Fix For: 1.15.0
>
>         Attachments: Lateral Parquet.pdf, Lateral json.pdf, flatten.pdf
>
>
> Data verification failure with lateral unnest query having filter in and order by .
> lateral query - 
> {code}
> select customer.c_custkey, customer.c_name, orders.totalprice from customer, lateral (select sum(t.o.o_totalprice) as totalprice from unnest(customer.c_orders) t(o) WHERE t.o.o_totalprice in (89230.03,270087.44,246408.53,82657.72,153941.38,65277.06,180309.76)) orders order by customer.c_custkey limit 50;
> {code}
> result :-
> {code}
> +------------+---------------------+-------------+
> | c_custkey | c_name | totalprice |
> +------------+---------------------+-------------+
> | 101276 | Customer#000101276 | 82657.72 |
> | 120295 | Customer#000120295 | 266119.96 |
> | 120376 | Customer#000120376 | 180309.76 |
> +------------+---------------------+-------------+
> {code}
> flatten query -
> {code}
> select f.c_custkey, f.c_name, sum(f.o.o_totalprice) from (select c_custkey, c_name, flatten(c_orders) as o from customer) f WHERE f.o.o_totalprice in (89230.03,270087.44,246408.53,82657.72,153941.38,65277.06,180309.76) group by f.c_custkey, f.c_name order by f.c_custkey limit 50;
> {code}
> result :-
> {code}
> +------------+---------------------+------------+
> | c_custkey | c_name | EXPR$2 |
> +------------+---------------------+------------+
> | 101276 | Customer#000101276 | 82657.72 |
> | 120376 | Customer#000120376 | 180309.76 |
> +------------+---------------------+------------+
> {code}
> PS :- The above results are for Parquet type data .The same query for JSON data gives identical result given as follows :-
> {code}
> +------------+---------------------+------------+
> | c_custkey | c_name | EXPR$2 |
> +------------+---------------------+------------+
> | 101276 | Customer#000101276 | 82657.72 |
> | 120376 | Customer#000120376 | 180309.76 |
> {code}



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