[jira] [Assigned] (DRILL-6448) query on nested data returns bogus results

2020-03-23 Thread Arina Ielchiieva (Jira)


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

Arina Ielchiieva reassigned DRILL-6448:
---

Assignee: (was: Arina Ielchiieva)

> query on nested data returns bogus results
> --
>
> Key: DRILL-6448
> URL: https://issues.apache.org/jira/browse/DRILL-6448
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Functions - Drill
>Affects Versions: 1.13.0
>Reporter: Dechang Gu
>Priority: Major
>
> I created a nested parquet table nested_c_o_l with the following schema:
> {code}
> message root {
>   optional binary c_custkey (UTF8);
>   optional binary c_name (UTF8);
>   optional binary c_address (UTF8);
>   optional int64 c_nationkey;
>   optional binary c_phone (UTF8);
>   optional double c_acctbal;
>   optional binary c_mktsegment (UTF8);
>   optional binary c_comment (UTF8);
>   repeated group c_orders {
> optional int64 o_orderkey;
> optional binary o_orderstatus (UTF8);
> optional double o_totalprice;
> optional binary o_orderdate (UTF8);
> optional binary o_orderpriority (UTF8);
> optional binary o_clerk (UTF8);
> optional int64 o_shippriority;
> optional binary o_comment (UTF8);
> repeated group o_lineitems {
>   optional int64 l_partkey;
>   optional int64 l_suppkey;
>   optional int64 l_linenumber;
>   optional int64 l_quantity;
>   optional double l_extendedprice;
>   optional double l_discount;
>   optional double l_tax;
>   optional binary l_returnflag (UTF8);
>   optional binary l_linestatus (UTF8);
>   optional binary l_shipdate (UTF8);
>   optional binary l_commitdate (UTF8);
>   optional binary l_receiptdate (UTF8);
>   optional binary l_shipinstruct (UTF8);
>   optional binary l_shipmode (UTF8);
>   optional binary l_comment (UTF8);
> }
>   }
> }
> {code}
> and run the following query:
> {code}
> select * from nested_c_o_l c where c.c_orders.o_orderdate='1997-06-23';
> {code}
> It returns two row, with the 2nd row does not satisfy the filter condition:
> {code}0: jdbc:drill:schema=dfs.tpcdsView> select * from nested_c_o_l c where 
> c.c_orders.o_orderdate='1997-06-23';
> +---++---+-+-+---+--+---+--+
> | c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | 
> c_mktsegment | c_comment | c_orders |
> +---++---+-+-+---+--+---+--+
> | 1 | Customer#1 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 
> | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e | 
> [{"o_orderkey":9154,"o_orderstatus":"O","o_totalprice":357345.46,"o_orderdate":"1997-06-23","o_orderpriority":"4-NOT
>  SPECIFIED","o_clerk":"Clerk#00328","o_shippriority":0,"o_comment":"y 
> ironic packages cajole. blithely final 
> depende","o_lineitems":[{"l_partkey":866,"l_suppkey":100,"l_linenumber":1,"l_quantity":45,"l_extendedprice":79508.7,"l_discount":0.06,"l_tax":0.06,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-09-24","l_commitdate":"1997-08-11","l_receiptdate":"1997-10-14","l_shipinstruct":"NONE","l_shipmode":"FOB","l_comment":"nal,
>  careful instructions wake carefully. 
> b"},{"l_partkey":1735,"l_suppkey":36,"l_linenumber":7,"l_quantity":47,"l_extendedprice":76926.31,"l_discount":0.04,"l_tax":0.05,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-07-07","l_commitdate":"1997-09-07","l_receiptdate":"1997-07-25","l_shipinstruct":"DELIVER
>  IN PERSON","l_shipmode":"SHIP","l_comment":"wake boldly above the 
> furiousl"},{"l_partkey":1403,"l_suppkey":43,"l_linenumber":6,"l_quantity":40,"l_extendedprice":52176.0,"l_discount":0.03,"l_tax":0.02,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-06-24","l_commitdate":"1997-09-03","l_receiptdate":"1997-07-24","l_shipinstruct":"COLLECT
>  COD","l_shipmode":"TRUCK","l_comment":"t haggle 
> bli"},{"l_partkey":1770,"l_suppkey":13,"l_linenumber":5,"l_quantity":12,"l_extendedprice":20061.24,"l_discount":0.0,"l_tax":0.0,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-08-20","l_commitdate":"1997-07-26","l_receiptdate":"1997-09-17","l_shipinstruct":"NONE","l_shipmode":"RAIL","l_comment":"es.
>  requests print furiously instead of 
> th"},{"l_partkey":1967,"l_suppkey":100,"l_linenumber":4,"l_quantity":31,"l_extendedprice":57937.76,"l_discount":0.0,"l_tax":0.0,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-08-28","l_commitdate":"1997-07-29","l_receiptdate":"1997-09-07","l_shipinstruct":"NONE","l_shipmode":"AIR","l_comment":"final
>  warthogs. slyly pending 
> 

[jira] [Assigned] (DRILL-6448) query on nested data returns bogus results

2018-05-25 Thread Pritesh Maker (JIRA)

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

Pritesh Maker reassigned DRILL-6448:


Assignee: Arina Ielchiieva

> query on nested data returns bogus results
> --
>
> Key: DRILL-6448
> URL: https://issues.apache.org/jira/browse/DRILL-6448
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Functions - Drill
>Affects Versions: 1.13.0
>Reporter: Dechang Gu
>Assignee: Arina Ielchiieva
>Priority: Major
>
> I created a nested parquet table nested_c_o_l with the following schema:
> {code}
> message root {
>   optional binary c_custkey (UTF8);
>   optional binary c_name (UTF8);
>   optional binary c_address (UTF8);
>   optional int64 c_nationkey;
>   optional binary c_phone (UTF8);
>   optional double c_acctbal;
>   optional binary c_mktsegment (UTF8);
>   optional binary c_comment (UTF8);
>   repeated group c_orders {
> optional int64 o_orderkey;
> optional binary o_orderstatus (UTF8);
> optional double o_totalprice;
> optional binary o_orderdate (UTF8);
> optional binary o_orderpriority (UTF8);
> optional binary o_clerk (UTF8);
> optional int64 o_shippriority;
> optional binary o_comment (UTF8);
> repeated group o_lineitems {
>   optional int64 l_partkey;
>   optional int64 l_suppkey;
>   optional int64 l_linenumber;
>   optional int64 l_quantity;
>   optional double l_extendedprice;
>   optional double l_discount;
>   optional double l_tax;
>   optional binary l_returnflag (UTF8);
>   optional binary l_linestatus (UTF8);
>   optional binary l_shipdate (UTF8);
>   optional binary l_commitdate (UTF8);
>   optional binary l_receiptdate (UTF8);
>   optional binary l_shipinstruct (UTF8);
>   optional binary l_shipmode (UTF8);
>   optional binary l_comment (UTF8);
> }
>   }
> }
> {code}
> and run the following query:
> {code}
> select * from nested_c_o_l c where c.c_orders.o_orderdate='1997-06-23';
> {code}
> It returns two row, with the 2nd row does not satisfy the filter condition:
> {code}0: jdbc:drill:schema=dfs.tpcdsView> select * from nested_c_o_l c where 
> c.c_orders.o_orderdate='1997-06-23';
> +---++---+-+-+---+--+---+--+
> | c_custkey | c_name | c_address | c_nationkey | c_phone | c_acctbal | 
> c_mktsegment | c_comment | c_orders |
> +---++---+-+-+---+--+---+--+
> | 1 | Customer#1 | IVhzIApeRb ot,c,E | 15 | 25-989-741-2988 | 711.56 
> | BUILDING | to the even, regular platelets. regular, ironic epitaphs nag e | 
> [{"o_orderkey":9154,"o_orderstatus":"O","o_totalprice":357345.46,"o_orderdate":"1997-06-23","o_orderpriority":"4-NOT
>  SPECIFIED","o_clerk":"Clerk#00328","o_shippriority":0,"o_comment":"y 
> ironic packages cajole. blithely final 
> depende","o_lineitems":[{"l_partkey":866,"l_suppkey":100,"l_linenumber":1,"l_quantity":45,"l_extendedprice":79508.7,"l_discount":0.06,"l_tax":0.06,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-09-24","l_commitdate":"1997-08-11","l_receiptdate":"1997-10-14","l_shipinstruct":"NONE","l_shipmode":"FOB","l_comment":"nal,
>  careful instructions wake carefully. 
> b"},{"l_partkey":1735,"l_suppkey":36,"l_linenumber":7,"l_quantity":47,"l_extendedprice":76926.31,"l_discount":0.04,"l_tax":0.05,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-07-07","l_commitdate":"1997-09-07","l_receiptdate":"1997-07-25","l_shipinstruct":"DELIVER
>  IN PERSON","l_shipmode":"SHIP","l_comment":"wake boldly above the 
> furiousl"},{"l_partkey":1403,"l_suppkey":43,"l_linenumber":6,"l_quantity":40,"l_extendedprice":52176.0,"l_discount":0.03,"l_tax":0.02,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-06-24","l_commitdate":"1997-09-03","l_receiptdate":"1997-07-24","l_shipinstruct":"COLLECT
>  COD","l_shipmode":"TRUCK","l_comment":"t haggle 
> bli"},{"l_partkey":1770,"l_suppkey":13,"l_linenumber":5,"l_quantity":12,"l_extendedprice":20061.24,"l_discount":0.0,"l_tax":0.0,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-08-20","l_commitdate":"1997-07-26","l_receiptdate":"1997-09-17","l_shipinstruct":"NONE","l_shipmode":"RAIL","l_comment":"es.
>  requests print furiously instead of 
> th"},{"l_partkey":1967,"l_suppkey":100,"l_linenumber":4,"l_quantity":31,"l_extendedprice":57937.76,"l_discount":0.0,"l_tax":0.0,"l_returnflag":"N","l_linestatus":"O","l_shipdate":"1997-08-28","l_commitdate":"1997-07-29","l_receiptdate":"1997-09-07","l_shipinstruct":"NONE","l_shipmode":"AIR","l_comment":"final
>  warthogs. slyly pending 
>