Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lateral unnest #559

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion before-run.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ alter system set `planner.enable_decimal_data_type` = true;
alter system set `new_view_default_permissions` = '777';
alter system set `planner.enable_limit0_optimization` = true;
alter system set `exec.errors.verbose` = true;
alter system set `planner.memory.max_query_memory_per_node` = 10737418240;
alter system set `planner.memory.max_query_memory_per_node` = 8589934590;
alter system set `drill.exec.hashagg.fallback.enabled` = true;
alter system set `drill.exec.hashjoin.fallback.enabled` = true;
select * from sys.options where status = 'CHANGED';
Expand Down
16 changes: 16 additions & 0 deletions conf/plugin-templates/common/dfs-storage-plugin.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@
"writable" : true,
"defaultInputFormat" : "parquet"
},
"drillTestDirLateralsf001Json" : {
"location" : "/drill/testdata/lateralUnnest/sf0dot01/json/",
"writable" : true,
"defaultInputFormat" : "json"
},
"drillTestDirLateralsf1Json" : {
"location" : "/drill/testdata/lateralUnnest/sf1/json/singlepart/",
"writable" : true,
"defaultInputFormat" : "json"
},
"drillTestDirLateralTpchSf1PartitionedSchemaChangeJson": {
"location": "/drill/testdata/lateralUnnest/sf1/json/multipart/PartitionedSchemaChange/",
"writable": true,
"defaultInputFormat": "json",
"allowAccessOutsideWorkspace": false
},
"drillTestDirAmplab" : {
"location" : "/drill/testdata/amplab",
"writable" : true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"testId": "lateral-unnest-json-tpch-sf0dot01",
"type": "group",
"description": "Test lateral unnest json tpch sf0dot01 queries via jdbc",
"categories": [
"functional"
],
"matrices": [

{
"query-file": ".*.sql",
"schema": "dfs.drillTestDirLateralsf001Json",
"output-format": "tsv",
"expected-file": ".*.e",
"verification-type": [
"in-memory"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Customer#000000001 IVhzIApeRb ot,c,E 52263 51135 712
Customer#000000001 IVhzIApeRb ot,c,E 24322 231040 712
Customer#000000001 IVhzIApeRb ot,c,E 43879 83096 712
Customer#000000001 IVhzIApeRb ot,c,E 34019 89230 712
Customer#000000001 IVhzIApeRb ot,c,E 53283 165928 712
Customer#000000001 IVhzIApeRb ot,c,E 31653 152411 712
Customer#000000001 IVhzIApeRb ot,c,E 36422 270087 712
Customer#000000001 IVhzIApeRb ot,c,E 9154 357345 712
Customer#000000001 IVhzIApeRb ot,c,E 14656 28600 712
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 16548 158826 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 55492 187967 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 50086 72065 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 56775 42579 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 20964 298876 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 21729 309286 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 17668 322342 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 30882 65298 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 26785 148499 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 27200 173191 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 35972 39228 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 30306 30727 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 34311 209263 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 33095 239750 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 55749 102945 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 49506 152700 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 54400 132174 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 18307 158347 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 43078 61921 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 9862 193016 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 58979 69241 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 11431 230290 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 20195 99068 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 40387 180784 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1602 6752 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 28898 122287 2754
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 13124 57676 2754
Customer#000000100 fptUABXcmkC5Wx 13733 328307 9890
Customer#000000100 fptUABXcmkC5Wx 33154 30287 9890
Customer#000000100 fptUABXcmkC5Wx 16199 291937 9890
Customer#000000100 fptUABXcmkC5Wx 34791 200764 9890
Customer#000000100 fptUABXcmkC5Wx 9317 156752 9890
Customer#000000100 fptUABXcmkC5Wx 27652 314923 9890
Customer#000000100 fptUABXcmkC5Wx 39457 127377 9890
Customer#000000100 fptUABXcmkC5Wx 227 69021 9890
Customer#000000100 fptUABXcmkC5Wx 31329 160314 9890
Customer#000000100 fptUABXcmkC5Wx 4032 78050 9890
Customer#000000100 fptUABXcmkC5Wx 27808 101817 9890
Customer#000000100 fptUABXcmkC5Wx 28996 269547 9890
Customer#000000100 fptUABXcmkC5Wx 32480 122189 9890
Customer#000000100 fptUABXcmkC5Wx 44386 166574 9890
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT customer.c_name, customer.c_address, orders.o_id, orders.o_amount ,cast(customer.c_acctbal as int)
FROM customer, LATERAL
(SELECT O.ord.o_orderkey as o_id, cast(O.ord.o_totalprice as int) as o_amount FROM UNNEST(customer.c_orders) O(ord)) orders order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXPLAIN PLAN FOR SELECT customer.c_name, customer.c_address, orders.o_id, orders.o_amount ,cast(customer.c_acctbal as int)
FROM customer, LATERAL
(SELECT O.ord.o_orderkey as o_id, cast(O.ord.o_totalprice as int) as o_amount FROM UNNEST(customer.c_orders) O(ord)) orders;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select f.c_name,f.c_address,f.o.o_orderkey as o_orderkey, cast(f.o.o_totalprice as int) as o_totalprice, cast(f.c_acctbal as int) from (select c_custkey, c_name,c_acctbal,c_address,flatten(c_orders) as o from customer) f order by f.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Customer#000000001 IVhzIApeRb ot,c,E 52263 null
Customer#000000001 IVhzIApeRb ot,c,E 24322 null
Customer#000000001 IVhzIApeRb ot,c,E 43879 null
Customer#000000001 IVhzIApeRb ot,c,E 34019 null
Customer#000000001 IVhzIApeRb ot,c,E 53283 null
Customer#000000001 IVhzIApeRb ot,c,E 31653 null
Customer#000000001 IVhzIApeRb ot,c,E 36422 null
Customer#000000001 IVhzIApeRb ot,c,E 9154 null
Customer#000000001 IVhzIApeRb ot,c,E 14656 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 16548 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 55492 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 50086 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 56775 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 20964 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 21729 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 17668 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 30882 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 26785 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 27200 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 35972 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 30306 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 34311 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 33095 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 55749 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 49506 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 54400 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 18307 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 43078 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 9862 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 58979 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 11431 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 20195 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 40387 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1602 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 28898 null
Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 13124 null
Customer#000000100 fptUABXcmkC5Wx 13733 null
Customer#000000100 fptUABXcmkC5Wx 33154 null
Customer#000000100 fptUABXcmkC5Wx 16199 null
Customer#000000100 fptUABXcmkC5Wx 34791 null
Customer#000000100 fptUABXcmkC5Wx 9317 null
Customer#000000100 fptUABXcmkC5Wx 27652 null
Customer#000000100 fptUABXcmkC5Wx 39457 null
Customer#000000100 fptUABXcmkC5Wx 227 null
Customer#000000100 fptUABXcmkC5Wx 31329 null
Customer#000000100 fptUABXcmkC5Wx 4032 null
Customer#000000100 fptUABXcmkC5Wx 27808 null
Customer#000000100 fptUABXcmkC5Wx 28996 null
Customer#000000100 fptUABXcmkC5Wx 32480 null
Customer#000000100 fptUABXcmkC5Wx 44386 null
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT customer.c_name, customer.c_address, orders.o_id, cast(customer.c_accbal as int)
FROM customer, LATERAL
(SELECT O.ord.o_orderkey as o_id, O.ord.o_totalprice as o_amount FROM UNNEST(customer.c_orders) O(ord)) orders order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXPLAIN PLAN FOR SELECT customer.c_name, customer.c_address, orders.o_id, cast(customer.c_accbal as int)
FROM customer, LATERAL
(SELECT O.ord.o_orderkey as o_id, O.ord.o_totalprice as o_amount FROM UNNEST(customer.c_orders) O(ord)) orders order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select f.c_name,f.c_address, f.o.o_orderkey as o_orderkey, cast(f.c_accbal as int) from (select c_custkey, c_name,c_address,c_accbal, flatten(c_orders) as o from customer) f order by f.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
1 Customer#000000001 711.56 52263 51134.82
1 Customer#000000001 711.56 24322 231040.44
1 Customer#000000001 711.56 43879 83095.85
1 Customer#000000001 711.56 34019 89230.03
1 Customer#000000001 711.56 53283 165928.33
1 Customer#000000001 711.56 31653 152411.41
1 Customer#000000001 711.56 36422 270087.44
1 Customer#000000001 711.56 9154 357345.46
1 Customer#000000001 711.56 14656 28599.83
10 Customer#000000010 2753.54 16548 158826.22
10 Customer#000000010 2753.54 55492 187966.88
10 Customer#000000010 2753.54 50086 72065.37
10 Customer#000000010 2753.54 56775 42578.88
10 Customer#000000010 2753.54 20964 298876.15
10 Customer#000000010 2753.54 21729 309286.33
10 Customer#000000010 2753.54 17668 322342.37
10 Customer#000000010 2753.54 30882 65297.83
10 Customer#000000010 2753.54 26785 148499.07
10 Customer#000000010 2753.54 27200 173191.03
10 Customer#000000010 2753.54 35972 39228.39
10 Customer#000000010 2753.54 30306 30726.71
10 Customer#000000010 2753.54 34311 209263.18
10 Customer#000000010 2753.54 33095 239749.78
10 Customer#000000010 2753.54 55749 102944.7
10 Customer#000000010 2753.54 49506 152699.84
10 Customer#000000010 2753.54 54400 132173.75
10 Customer#000000010 2753.54 18307 158346.75
10 Customer#000000010 2753.54 43078 61921.02
10 Customer#000000010 2753.54 9862 193015.83
10 Customer#000000010 2753.54 58979 69241.25
10 Customer#000000010 2753.54 11431 230289.6
10 Customer#000000010 2753.54 20195 99067.93
10 Customer#000000010 2753.54 40387 180784.32
10 Customer#000000010 2753.54 1602 6751.57
10 Customer#000000010 2753.54 28898 122287.09
10 Customer#000000010 2753.54 13124 57676.34
1001 Customer#000001001 7140.81 43808 97149.05
1001 Customer#000001001 7140.81 45925 46401.06
1001 Customer#000001001 7140.81 32422 166463.78
1001 Customer#000001001 7140.81 46177 215046.15
1001 Customer#000001001 7140.81 24710 56548.72
1001 Customer#000001001 7140.81 24768 97110.39
1001 Customer#000001001 7140.81 59047 149866.62
1001 Customer#000001001 7140.81 19845 147600.9
1001 Customer#000001001 7140.81 19877 262459.17
1001 Customer#000001001 7140.81 4133 39006.98
1001 Customer#000001001 7140.81 8994 214292.33
1001 Customer#000001001 7140.81 10881 235385.68
1001 Customer#000001001 7140.81 23493 52291.0
1001 Customer#000001001 7140.81 59200 130966.36
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT customer.c_custkey, customer.c_name,customer.c_acctbal,orders.o_orderkey, orders.o_totalprice
FROM customer, LATERAL (SELECT O.ord.o_orderkey as o_orderkey, O.ord.o_totalprice as o_totalprice FROM UNNEST(customer.c_orders) O(ord)) orders WHERE customer.c_acctbal between 0 and 9000 order by customer.c_custkey limit 50 ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXPLAIN PLAN FOR SELECT customer.c_custkey, customer.c_name,customer.c_acctbal,orders.o_orderkey, orders.o_totalprice
FROM customer, LATERAL (SELECT O.ord.o_orderkey as o_orderkey, O.ord.o_totalprice as o_totalprice FROM UNNEST(customer.c_orders) O(ord)) orders WHERE customer.c_acctbal between 0 and 9000 order by customer.c_custkey limit 50 ;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select f.c_custkey, f.c_name,f.c_acctbal, f.o.o_orderkey as o_orderkey, f.o.o_totalprice as o_totalprice from (select c_custkey, c_name,c_acctbal, flatten(c_orders) as o from customer) f WHERE f.c_acctbal between 0 and 9000 order by f.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1489 Customer#000001489 46594 82657.72 1-URGENT
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount,orders.O_ORDERPRIORITY
FROM customer, LATERAL
(SELECT O.ord.o_orderkey as o_id, O.ord.o_totalprice as o_amount,O.ord.O_ORDERPRIORITY as O_ORDERPRIORITY FROM UNNEST(customer.c_orders) O(ord) WHERE O.ord.o_totalprice in (89230.03,270087.44,246408.53,82657.72,153941.38,65277.06,180309.76) AND O.ord.O_ORDERPRIORITY like '%URGENT%' )orders order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXPLAIN PLAN FOR SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount,orders.O_ORDERPRIORITY
FROM customer, LATERAL
(SELECT O.ord.o_orderkey as o_id, O.ord.o_totalprice as o_amount,O.ord.O_ORDERPRIORITY as O_ORDERPRIORITY FROM UNNEST(customer.c_orders) O(ord) WHERE O.ord.o_totalprice in (89230.03,270087.44,246408.53,82657.72,153941.38,65277.06,180309.76) AND O.ord.O_ORDERPRIORITY like '%URGENT%' )orders order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select f.c_custkey, f.c_name, f.o.o_orderkey as o_orderkey, f.o.o_totalprice as o_totalprice,f.o.O_ORDERPRIORITY 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) AND f.O.O_ORDERPRIORITY like '%URGENT%' order by f.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1 Customer#000000001 34019 89230.03
1 Customer#000000001 36422 270087.44
1489 Customer#000001489 46594 82657.72
1489 Customer#000001489 58403 153941.38
1489 Customer#000001489 55015 246408.53
1495 Customer#000001495 3940 180309.76
1495 Customer#000001495 1953 65277.06
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT customer.c_custkey,customer.c_name,orders.o_orderkey, orders.o_totalprice
FROM customer, LATERAL (SELECT O.ord.o_orderkey as o_orderkey, O.ord.o_totalprice as o_totalprice FROM UNNEST(customer.c_orders) O(ord) WHERE O.ord.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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXPLAIN PLAN FOR SELECT customer.c_custkey,customer.c_name,orders.o_orderkey, orders.o_totalprice
FROM customer, LATERAL (SELECT O.ord.o_orderkey as o_orderkey, O.ord.o_totalprice as o_totalprice FROM UNNEST(customer.c_orders) O(ord) WHERE O.ord.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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1 Customer#000000001 711.56 36422 270087.44
1 Customer#000000001 711.56 34019 89230.03
1489 Customer#000001489 4389.66 55015 246408.53
1489 Customer#000001489 4389.66 58403 153941.38
1489 Customer#000001489 4389.66 46594 82657.72
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT customer.c_custkey, customer.c_name,customer.c_acctbal,orders.o_id, orders.o_amount FROM customer,
LATERAL (SELECT O.ord.o_orderkey as o_id, O.ord.o_totalprice as o_amount FROM UNNEST(customer.c_orders) O(ord) WHERE O.ord.o_totalprice in (89230.03,270087.44,246408.53,82657.72,153941.38,65277.06,180309.76) )orders WHERE customer.c_acctbal between 0 and 6000 order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXPLAIN PLAN FOR SELECT customer.c_custkey, customer.c_name,customer.c_acctbal,orders.o_id, orders.o_amount FROM customer,
LATERAL (SELECT O.ord.o_orderkey as o_id, O.ord.o_totalprice as o_amount FROM UNNEST(customer.c_orders) O(ord) WHERE O.ord.o_totalprice in (89230.03,270087.44,246408.53,82657.72,153941.38,65277.06,180309.76) )orders WHERE customer.c_acctbal between 0 and 6000 order by customer.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select f.c_custkey, f.c_name,f.c_acctbal, f.o.o_orderkey as o_orderkey, f.o.o_totalprice as o_totalprice from (select c_custkey, c_name,c_acctbal, 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) and f.c_acctbal between 0 and 6000 order by f.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select f.c_custkey, f.c_name, f.o.o_orderkey as o_orderkey, f.o.o_totalprice as 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) order by f.c_custkey limit 50;
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
1003 Customer#000001003 26177 104483.35 7894.0 AUTOMOBILE
1003 Customer#000001003 58695 68042.41 7894.0 AUTOMOBILE
1003 Customer#000001003 4964 285003.26 7894.0 AUTOMOBILE
1003 Customer#000001003 45540 11873.36 7894.0 AUTOMOBILE
1003 Customer#000001003 15779 405401.76 7894.0 AUTOMOBILE
1003 Customer#000001003 5733 50786.52 7894.0 AUTOMOBILE
1003 Customer#000001003 46593 20938.42 7894.0 AUTOMOBILE
1003 Customer#000001003 8608 139751.37 7894.0 AUTOMOBILE
1003 Customer#000001003 58531 26362.7 7894.0 AUTOMOBILE
1003 Customer#000001003 38436 115545.25 7894.0 AUTOMOBILE
1003 Customer#000001003 19526 18785.97 7894.0 AUTOMOBILE
1003 Customer#000001003 30176 115102.33 7894.0 AUTOMOBILE
1003 Customer#000001003 45219 228367.86 7894.0 AUTOMOBILE
1003 Customer#000001003 44326 98737.18 7894.0 AUTOMOBILE
1003 Customer#000001003 5892 122565.47 7894.0 AUTOMOBILE
1003 Customer#000001003 27552 85345.05 7894.0 AUTOMOBILE
1003 Customer#000001003 8070 341050.25 7894.0 AUTOMOBILE
1003 Customer#000001003 5923 220218.91 7894.0 AUTOMOBILE
1010 Customer#000001010 55075 182615.63 1652.78 AUTOMOBILE
1010 Customer#000001010 39333 348230.52 1652.78 AUTOMOBILE
1010 Customer#000001010 51937 91241.41 1652.78 AUTOMOBILE
1010 Customer#000001010 29572 88449.12 1652.78 AUTOMOBILE
1010 Customer#000001010 9955 188555.97 1652.78 AUTOMOBILE
1010 Customer#000001010 38273 88579.8 1652.78 AUTOMOBILE
1010 Customer#000001010 12035 245999.17 1652.78 AUTOMOBILE
1010 Customer#000001010 18689 259954.42 1652.78 AUTOMOBILE
1010 Customer#000001010 56038 177186.11 1652.78 AUTOMOBILE
1010 Customer#000001010 9120 128719.48 1652.78 AUTOMOBILE
1012 Customer#000001012 18182 254337.04 4422.45 AUTOMOBILE
1012 Customer#000001012 27489 26555.48 4422.45 AUTOMOBILE
1012 Customer#000001012 31396 117922.04 4422.45 AUTOMOBILE
1012 Customer#000001012 50241 143624.91 4422.45 AUTOMOBILE
1012 Customer#000001012 56034 203771.43 4422.45 AUTOMOBILE
1012 Customer#000001012 49570 61103.64 4422.45 AUTOMOBILE
1012 Customer#000001012 59456 162010.3 4422.45 AUTOMOBILE
1012 Customer#000001012 45827 169239.19 4422.45 AUTOMOBILE
1012 Customer#000001012 46080 199364.16 4422.45 AUTOMOBILE
1012 Customer#000001012 59750 243541.8 4422.45 AUTOMOBILE
1012 Customer#000001012 5575 71308.78 4422.45 AUTOMOBILE
1012 Customer#000001012 8515 209946.93 4422.45 AUTOMOBILE
1012 Customer#000001012 9285 118683.77 4422.45 AUTOMOBILE
1012 Customer#000001012 37959 147247.56 4422.45 AUTOMOBILE
1012 Customer#000001012 11076 54498.05 4422.45 AUTOMOBILE
1012 Customer#000001012 13346 244898.42 4422.45 AUTOMOBILE
1012 Customer#000001012 35207 169768.34 4422.45 AUTOMOBILE
1016 Customer#000001016 4870 140038.23 2357.54 AUTOMOBILE
1016 Customer#000001016 13542 302527.26 2357.54 AUTOMOBILE
1016 Customer#000001016 14048 221205.2 2357.54 AUTOMOBILE
1016 Customer#000001016 3015 165794.93 2357.54 AUTOMOBILE
1016 Customer#000001016 18820 168451.41 2357.54 AUTOMOBILE
Loading