diff --git a/before-run.sql b/before-run.sql index 52982848f..0cf7900c6 100644 --- a/before-run.sql +++ b/before-run.sql @@ -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'; diff --git a/conf/plugin-templates/common/dfs-storage-plugin.template b/conf/plugin-templates/common/dfs-storage-plugin.template index 42149c728..5c0bf22cf 100755 --- a/conf/plugin-templates/common/dfs-storage-plugin.template +++ b/conf/plugin-templates/common/dfs-storage-plugin.template @@ -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, diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateralUnnestsf0dot01.json b/framework/resources/Functional/lateralUnnest/sf0dot01/lateralUnnestsf0dot01.json new file mode 100644 index 000000000..cba4c310a --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateralUnnestsf0dot01.json @@ -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" + ] + } + ] +} diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.e new file mode 100644 index 000000000..55e4316d2 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.e @@ -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 diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.sql new file mode 100644 index 000000000..af81d1c0e --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.sql.explain new file mode 100644 index 000000000..eda831bf0 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside.sql.explain @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside_flatten.sql new file mode 100644 index 000000000..b31c9e0f3 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_inside_outside_flatten.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.e new file mode 100644 index 000000000..aae0ae155 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.e @@ -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 diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.sql new file mode 100644 index 000000000..2bea949fe --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.sql.explain new file mode 100644 index 000000000..af087dbd9 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside.sql.explain @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside_flatten.sql new file mode 100644 index 000000000..b92efef4f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_cast_outside_flatten.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.e new file mode 100644 index 000000000..148c8d7fb --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.e @@ -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 diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.sql new file mode 100644 index 000000000..3961202f6 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.sql @@ -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 ; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.sql.explain new file mode 100644 index 000000000..91382919f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside.sql.explain @@ -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 ; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside_flatten.sql new file mode 100644 index 000000000..826fb80aa --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_between_outside_flatten.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.e new file mode 100644 index 000000000..70c3105c4 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.e @@ -0,0 +1 @@ +1489 Customer#000001489 46594 82657.72 1-URGENT diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.sql new file mode 100644 index 000000000..bf25fc8cc --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.sql.explain new file mode 100644 index 000000000..6b0575cc2 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside.sql.explain @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside_flatten.sql new file mode 100644 index 000000000..d9e484d0f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_and_like_inside_flatten.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.e new file mode 100644 index 000000000..e8c3ce618 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.e @@ -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 diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.sql new file mode 100644 index 000000000..faf6ec722 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.sql.explain new file mode 100644 index 000000000..b1bb852a5 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside.sql.explain @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.e new file mode 100644 index 000000000..b0b445622 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.e @@ -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 diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.sql new file mode 100644 index 000000000..c5dc7de2e --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.sql.explain new file mode 100644 index 000000000..d07203b09 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside.sql.explain @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside_flatten.sql new file mode 100644 index 000000000..a1f0c5868 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_between_outside_flatten.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_flatten.sql new file mode 100644 index 000000000..37b3d912c --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_in_inside_flatten.sql @@ -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; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.e new file mode 100644 index 000000000..a01dd7e0f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.e @@ -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 diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.sql new file mode 100644 index 000000000..e5199a0a6 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.sql @@ -0,0 +1,3 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment +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 WHERE customer.c_acctbal between 0 and 9000 AND customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.sql.explain new file mode 100644 index 000000000..d2384987a --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside.sql.explain @@ -0,0 +1,3 @@ +EXPLAIN PLAN FOR SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment +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 WHERE customer.c_acctbal between 0 and 9000 AND customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside_flatten.sql new file mode 100644 index 000000000..1542d6b4f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_and_between_outside_flatten.sql @@ -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.c_acctbal, f.c_mktsegment from (select c_custkey, c_name,c_acctbal,c_mktsegment, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' AND f.c_acctbal between 0 and 9000 order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.e new file mode 100644 index 000000000..f8fd9f1c8 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.e @@ -0,0 +1,50 @@ +1 Customer#000000001 24322 231040.44 1-URGENT +10 Customer#000000010 56775 42578.88 1-URGENT +10 Customer#000000010 55492 187966.88 1-URGENT +10 Customer#000000010 58979 69241.25 1-URGENT +10 Customer#000000010 55749 102944.7 1-URGENT +10 Customer#000000010 20964 298876.15 1-URGENT +10 Customer#000000010 49506 152699.84 1-URGENT +10 Customer#000000010 40387 180784.32 1-URGENT +10 Customer#000000010 20195 99067.93 1-URGENT +10 Customer#000000010 35972 39228.39 1-URGENT +100 Customer#000000100 28996 269546.76 1-URGENT +100 Customer#000000100 16199 291936.7 1-URGENT +100 Customer#000000100 33154 30287.4 1-URGENT +1000 Customer#000001000 25731 197028.42 1-URGENT +1000 Customer#000001000 53057 238483.87 1-URGENT +1000 Customer#000001000 47715 132433.44 1-URGENT +1001 Customer#000001001 10881 235385.68 1-URGENT +1003 Customer#000001003 27552 85345.05 1-URGENT +1004 Customer#000001004 42754 266979.42 1-URGENT +1004 Customer#000001004 23937 103970.33 1-URGENT +1006 Customer#000001006 31975 82250.07 1-URGENT +1006 Customer#000001006 5061 72555.51 1-URGENT +1006 Customer#000001006 16514 193653.14 1-URGENT +1006 Customer#000001006 8038 117874.75 1-URGENT +1006 Customer#000001006 33252 347058.46 1-URGENT +1007 Customer#000001007 28516 91109.51 1-URGENT +1009 Customer#000001009 31168 144680.2 1-URGENT +1009 Customer#000001009 15232 38488.1 1-URGENT +1009 Customer#000001009 40421 77477.42 1-URGENT +1009 Customer#000001009 43459 29671.66 1-URGENT +1009 Customer#000001009 54914 251683.89 1-URGENT +1009 Customer#000001009 25700 19708.7 1-URGENT +101 Customer#000000101 50884 185546.78 1-URGENT +1010 Customer#000001010 9955 188555.97 1-URGENT +1010 Customer#000001010 39333 348230.52 1-URGENT +1010 Customer#000001010 55075 182615.63 1-URGENT +1010 Customer#000001010 56038 177186.11 1-URGENT +1012 Customer#000001012 9285 118683.77 1-URGENT +1012 Customer#000001012 11076 54498.05 1-URGENT +1012 Customer#000001012 49570 61103.64 1-URGENT +1012 Customer#000001012 8515 209946.93 1-URGENT +1013 Customer#000001013 2241 248564.48 1-URGENT +1013 Customer#000001013 3424 67108.17 1-URGENT +1013 Customer#000001013 44707 431771.98 1-URGENT +1013 Customer#000001013 42468 53705.49 1-URGENT +1013 Customer#000001013 50788 211423.04 1-URGENT +1015 Customer#000001015 17061 111052.02 1-URGENT +1015 Customer#000001015 19300 171965.23 1-URGENT +1015 Customer#000001015 26209 85655.99 1-URGENT +1015 Customer#000001015 42788 100877.96 1-URGENT diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.sql new file mode 100644 index 000000000..6685d0810 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.sql @@ -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_ORDERPRIORITY like '%URGENT%' )orders order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.sql.explain new file mode 100644 index 000000000..37bdc4e62 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside.sql.explain @@ -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_ORDERPRIORITY like '%URGENT%' )orders order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside_flatten.sql new file mode 100644 index 000000000..a38586a0f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_inside_flatten.sql @@ -0,0 +1 @@ +select f.c_custkey, f.c_name, f.o.o_orderkey as o_orderkey,f.o.o_totalprice as o_amount, f.o.O_ORDERPRIORITY as O_ORDERPRIORITY from (select c_custkey, c_name, flatten(c_orders) as o from customer) f WHERE f.o.O_ORDERPRIORITY like '%URGENT%' order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.e new file mode 100644 index 000000000..79d2ba031 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.e @@ -0,0 +1,50 @@ +1 Customer#000000001 52263 51134.82 711.56 BUILDING +1 Customer#000000001 24322 231040.44 711.56 BUILDING +1 Customer#000000001 43879 83095.85 711.56 BUILDING +1 Customer#000000001 34019 89230.03 711.56 BUILDING +1 Customer#000000001 53283 165928.33 711.56 BUILDING +1 Customer#000000001 31653 152411.41 711.56 BUILDING +1 Customer#000000001 36422 270087.44 711.56 BUILDING +1 Customer#000000001 9154 357345.46 711.56 BUILDING +1 Customer#000000001 14656 28599.83 711.56 BUILDING +10 Customer#000000010 16548 158826.22 2753.54 HOUSEHOLD +10 Customer#000000010 55492 187966.88 2753.54 HOUSEHOLD +10 Customer#000000010 50086 72065.37 2753.54 HOUSEHOLD +10 Customer#000000010 56775 42578.88 2753.54 HOUSEHOLD +10 Customer#000000010 20964 298876.15 2753.54 HOUSEHOLD +10 Customer#000000010 21729 309286.33 2753.54 HOUSEHOLD +10 Customer#000000010 17668 322342.37 2753.54 HOUSEHOLD +10 Customer#000000010 30882 65297.83 2753.54 HOUSEHOLD +10 Customer#000000010 26785 148499.07 2753.54 HOUSEHOLD +10 Customer#000000010 27200 173191.03 2753.54 HOUSEHOLD +10 Customer#000000010 35972 39228.39 2753.54 HOUSEHOLD +10 Customer#000000010 30306 30726.71 2753.54 HOUSEHOLD +10 Customer#000000010 34311 209263.18 2753.54 HOUSEHOLD +10 Customer#000000010 33095 239749.78 2753.54 HOUSEHOLD +10 Customer#000000010 55749 102944.7 2753.54 HOUSEHOLD +10 Customer#000000010 49506 152699.84 2753.54 HOUSEHOLD +10 Customer#000000010 54400 132173.75 2753.54 HOUSEHOLD +10 Customer#000000010 18307 158346.75 2753.54 HOUSEHOLD +10 Customer#000000010 43078 61921.02 2753.54 HOUSEHOLD +10 Customer#000000010 9862 193015.83 2753.54 HOUSEHOLD +10 Customer#000000010 58979 69241.25 2753.54 HOUSEHOLD +10 Customer#000000010 11431 230289.6 2753.54 HOUSEHOLD +10 Customer#000000010 20195 99067.93 2753.54 HOUSEHOLD +10 Customer#000000010 40387 180784.32 2753.54 HOUSEHOLD +10 Customer#000000010 1602 6751.57 2753.54 HOUSEHOLD +10 Customer#000000010 28898 122287.09 2753.54 HOUSEHOLD +10 Customer#000000010 13124 57676.34 2753.54 HOUSEHOLD +1001 Customer#000001001 43808 97149.05 7140.81 MACHINERY +1001 Customer#000001001 45925 46401.06 7140.81 MACHINERY +1001 Customer#000001001 32422 166463.78 7140.81 MACHINERY +1001 Customer#000001001 46177 215046.15 7140.81 MACHINERY +1001 Customer#000001001 24710 56548.72 7140.81 MACHINERY +1001 Customer#000001001 24768 97110.39 7140.81 MACHINERY +1001 Customer#000001001 59047 149866.62 7140.81 MACHINERY +1001 Customer#000001001 19845 147600.9 7140.81 MACHINERY +1001 Customer#000001001 19877 262459.17 7140.81 MACHINERY +1001 Customer#000001001 4133 39006.98 7140.81 MACHINERY +1001 Customer#000001001 8994 214292.33 7140.81 MACHINERY +1001 Customer#000001001 10881 235385.68 7140.81 MACHINERY +1001 Customer#000001001 23493 52291.0 7140.81 MACHINERY +1001 Customer#000001001 59200 130966.36 7140.81 MACHINERY diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.sq b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.sq new file mode 100644 index 000000000..60d9ee403 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.sq @@ -0,0 +1,2 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment 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 WHERE customer.c_acctbal between 0 and 9000 OR customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.sql.explain new file mode 100644 index 000000000..f3bead461 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside.sql.explain @@ -0,0 +1,2 @@ +EXPLAIN PLAN FOR SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment 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 WHERE customer.c_acctbal between 0 and 9000 OR customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside_flatten.sql new file mode 100644 index 000000000..271b7528a --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_or_between_outside_flatten.sql @@ -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.c_acctbal, f.c_mktsegment from (select c_custkey, c_name,c_mktsegment,c_acctbal, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' OR f.c_acctbal between 0 and 9000 order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.e new file mode 100644 index 000000000..0192d8d89 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.e @@ -0,0 +1,50 @@ +1003 Customer#000001003 45219 228367.86 AUTOMOBILE +1003 Customer#000001003 58695 68042.41 AUTOMOBILE +1003 Customer#000001003 30176 115102.33 AUTOMOBILE +1003 Customer#000001003 5733 50786.52 AUTOMOBILE +1003 Customer#000001003 4964 285003.26 AUTOMOBILE +1003 Customer#000001003 58531 26362.7 AUTOMOBILE +1003 Customer#000001003 44326 98737.18 AUTOMOBILE +1003 Customer#000001003 19526 18785.97 AUTOMOBILE +1003 Customer#000001003 26177 104483.35 AUTOMOBILE +1003 Customer#000001003 38436 115545.25 AUTOMOBILE +1003 Customer#000001003 27552 85345.05 AUTOMOBILE +1003 Customer#000001003 46593 20938.42 AUTOMOBILE +1003 Customer#000001003 5923 220218.91 AUTOMOBILE +1003 Customer#000001003 8070 341050.25 AUTOMOBILE +1003 Customer#000001003 15779 405401.76 AUTOMOBILE +1003 Customer#000001003 5892 122565.47 AUTOMOBILE +1003 Customer#000001003 45540 11873.36 AUTOMOBILE +1003 Customer#000001003 8608 139751.37 AUTOMOBILE +1010 Customer#000001010 29572 88449.12 AUTOMOBILE +1010 Customer#000001010 51937 91241.41 AUTOMOBILE +1010 Customer#000001010 55075 182615.63 AUTOMOBILE +1010 Customer#000001010 38273 88579.8 AUTOMOBILE +1010 Customer#000001010 39333 348230.52 AUTOMOBILE +1010 Customer#000001010 9120 128719.48 AUTOMOBILE +1010 Customer#000001010 9955 188555.97 AUTOMOBILE +1010 Customer#000001010 12035 245999.17 AUTOMOBILE +1010 Customer#000001010 56038 177186.11 AUTOMOBILE +1010 Customer#000001010 18689 259954.42 AUTOMOBILE +1012 Customer#000001012 59750 243541.8 AUTOMOBILE +1012 Customer#000001012 56034 203771.43 AUTOMOBILE +1012 Customer#000001012 59456 162010.3 AUTOMOBILE +1012 Customer#000001012 46080 199364.16 AUTOMOBILE +1012 Customer#000001012 49570 61103.64 AUTOMOBILE +1012 Customer#000001012 37959 147247.56 AUTOMOBILE +1012 Customer#000001012 45827 169239.19 AUTOMOBILE +1012 Customer#000001012 50241 143624.91 AUTOMOBILE +1012 Customer#000001012 11076 54498.05 AUTOMOBILE +1012 Customer#000001012 13346 244898.42 AUTOMOBILE +1012 Customer#000001012 18182 254337.04 AUTOMOBILE +1012 Customer#000001012 27489 26555.48 AUTOMOBILE +1012 Customer#000001012 5575 71308.78 AUTOMOBILE +1012 Customer#000001012 8515 209946.93 AUTOMOBILE +1012 Customer#000001012 9285 118683.77 AUTOMOBILE +1012 Customer#000001012 31396 117922.04 AUTOMOBILE +1012 Customer#000001012 35207 169768.34 AUTOMOBILE +1016 Customer#000001016 3015 165794.93 AUTOMOBILE +1016 Customer#000001016 4870 140038.23 AUTOMOBILE +1016 Customer#000001016 13542 302527.26 AUTOMOBILE +1016 Customer#000001016 14048 221205.2 AUTOMOBILE +1016 Customer#000001016 18820 168451.41 AUTOMOBILE diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.sql new file mode 100644 index 000000000..1bbaf0aec --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.sql @@ -0,0 +1,3 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_mktsegment +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 WHERE customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.sql.explain b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.sql.explain new file mode 100644 index 000000000..64e01c43f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside.sql.explain @@ -0,0 +1,3 @@ +EXPLAIN PLAN FOR SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_mktsegment +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 WHERE customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside_flatten.sql new file mode 100644 index 000000000..fa64d0027 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf0dot01/lateral_unnest_filter_like_outside_flatten.sql @@ -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.c_mktsegment from (select c_custkey, c_name, c_mktsegment, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateralUnnestPartiitonedSchemaChangedsf1.json.fail b/framework/resources/Functional/lateralUnnest/sf1/lateralUnnestPartiitonedSchemaChangedsf1.json.fail new file mode 100644 index 000000000..d293a5afc --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateralUnnestPartiitonedSchemaChangedsf1.json.fail @@ -0,0 +1,20 @@ +{ + "testId": "lateral-unnest-json-tpch-partitioned-schemachnaged-sf1", + "type": "group", + "description": "Test lateral unnest json tpch sf1 queries on partiitoned schema changed complex data via jdbc", + "categories": [ + "functional" + ], + "matrices": [ + + { + "query-file": ".*.sql", + "schema": "dfs.drillTestDirLateralTpchSf1PartitionedSchemaChangeJson", + "output-format": "tsv", + "expected-file": ".*.e", + "verification-type": [ + "in-memory" + ] + } + ] +} diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateralUnnestsf1.json b/framework/resources/Functional/lateralUnnest/sf1/lateralUnnestsf1.json new file mode 100644 index 000000000..ae7837d56 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateralUnnestsf1.json @@ -0,0 +1,20 @@ +{ + "testId": "lateral-unnest-json-tpch-sf1", + "type": "group", + "description": "Test lateral unnest json tpch sf1 queries via jdbc", + "categories": [ + "functional" + ], + "matrices": [ + + { + "query-file": ".*.q", + "schema": "dfs.drillTestDirLateralsf1Json", + "output-format": "tsv", + "expected-file": ".*.e", + "verification-type": [ + "in-memory" + ] + } + ] +} diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.e new file mode 100644 index 000000000..cb725a287 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.e @@ -0,0 +1,50 @@ +Customer#000000001 IVhzIApeRb ot,c,E 454791 74603 712 +Customer#000000001 IVhzIApeRb ot,c,E 579908 54048 712 +Customer#000000001 IVhzIApeRb ot,c,E 3868359 123077 712 +Customer#000000001 IVhzIApeRb ot,c,E 4273923 95911 712 +Customer#000000001 IVhzIApeRb ot,c,E 4808192 65478 712 +Customer#000000001 IVhzIApeRb ot,c,E 5133509 174646 712 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 36422 287837 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 816323 249097 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 859108 135313 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 883557 53856 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 895172 236807 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 916775 279937 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1490087 227527 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1774689 13823 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2126688 50998 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2917345 52546 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3069221 26861 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3354726 158148 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3487745 193145 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3580034 229817 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3916288 99925 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3942656 327961 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4141668 168477 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4243142 132159 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4407621 93718 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4616224 21632 2754 +Customer#000000100 fptUABXcmkC5Wx 455491 123323 9890 +Customer#000000100 fptUABXcmkC5Wx 835718 133061 9890 +Customer#000000100 fptUABXcmkC5Wx 1725762 107420 9890 +Customer#000000100 fptUABXcmkC5Wx 1777831 88380 9890 +Customer#000000100 fptUABXcmkC5Wx 1825479 60816 9890 +Customer#000000100 fptUABXcmkC5Wx 2082146 105814 9890 +Customer#000000100 fptUABXcmkC5Wx 2169568 48088 9890 +Customer#000000100 fptUABXcmkC5Wx 2320995 65647 9890 +Customer#000000100 fptUABXcmkC5Wx 3220646 71384 9890 +Customer#000000100 fptUABXcmkC5Wx 3316229 140604 9890 +Customer#000000100 fptUABXcmkC5Wx 3372900 217857 9890 +Customer#000000100 fptUABXcmkC5Wx 4145986 68353 9890 +Customer#000000100 fptUABXcmkC5Wx 4596098 192446 9890 +Customer#000000100 fptUABXcmkC5Wx 4752803 272935 9890 +Customer#000000100 fptUABXcmkC5Wx 4823748 102949 9890 +Customer#000000100 fptUABXcmkC5Wx 4940704 215954 9890 +Customer#000000100 fptUABXcmkC5Wx 5381473 19278 9890 +Customer#000000100 fptUABXcmkC5Wx 5592131 297698 9890 +Customer#000000100 fptUABXcmkC5Wx 5724295 174293 9890 +Customer#000000100 fptUABXcmkC5Wx 5877348 224881 9890 +Customer#000001000 hzM1shTwWlLuk 454240 71172 -882 +Customer#000001000 hzM1shTwWlLuk 881509 27611 -882 +Customer#000001000 hzM1shTwWlLuk 1005920 225560 -882 +Customer#000001000 hzM1shTwWlLuk 1127618 157563 -882 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.q new file mode 100644 index 000000000..84fc76801 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.q @@ -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,customer.c_address, orders.o_id, orders.o_amount limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.sql new file mode 100644 index 000000000..84fc76801 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside.sql @@ -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,customer.c_address, orders.o_id, orders.o_amount limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.e new file mode 100644 index 000000000..cb725a287 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.e @@ -0,0 +1,50 @@ +Customer#000000001 IVhzIApeRb ot,c,E 454791 74603 712 +Customer#000000001 IVhzIApeRb ot,c,E 579908 54048 712 +Customer#000000001 IVhzIApeRb ot,c,E 3868359 123077 712 +Customer#000000001 IVhzIApeRb ot,c,E 4273923 95911 712 +Customer#000000001 IVhzIApeRb ot,c,E 4808192 65478 712 +Customer#000000001 IVhzIApeRb ot,c,E 5133509 174646 712 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 36422 287837 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 816323 249097 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 859108 135313 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 883557 53856 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 895172 236807 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 916775 279937 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1490087 227527 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1774689 13823 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2126688 50998 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2917345 52546 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3069221 26861 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3354726 158148 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3487745 193145 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3580034 229817 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3916288 99925 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3942656 327961 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4141668 168477 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4243142 132159 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4407621 93718 2754 +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4616224 21632 2754 +Customer#000000100 fptUABXcmkC5Wx 455491 123323 9890 +Customer#000000100 fptUABXcmkC5Wx 835718 133061 9890 +Customer#000000100 fptUABXcmkC5Wx 1725762 107420 9890 +Customer#000000100 fptUABXcmkC5Wx 1777831 88380 9890 +Customer#000000100 fptUABXcmkC5Wx 1825479 60816 9890 +Customer#000000100 fptUABXcmkC5Wx 2082146 105814 9890 +Customer#000000100 fptUABXcmkC5Wx 2169568 48088 9890 +Customer#000000100 fptUABXcmkC5Wx 2320995 65647 9890 +Customer#000000100 fptUABXcmkC5Wx 3220646 71384 9890 +Customer#000000100 fptUABXcmkC5Wx 3316229 140604 9890 +Customer#000000100 fptUABXcmkC5Wx 3372900 217857 9890 +Customer#000000100 fptUABXcmkC5Wx 4145986 68353 9890 +Customer#000000100 fptUABXcmkC5Wx 4596098 192446 9890 +Customer#000000100 fptUABXcmkC5Wx 4752803 272935 9890 +Customer#000000100 fptUABXcmkC5Wx 4823748 102949 9890 +Customer#000000100 fptUABXcmkC5Wx 4940704 215954 9890 +Customer#000000100 fptUABXcmkC5Wx 5381473 19278 9890 +Customer#000000100 fptUABXcmkC5Wx 5592131 297698 9890 +Customer#000000100 fptUABXcmkC5Wx 5724295 174293 9890 +Customer#000000100 fptUABXcmkC5Wx 5877348 224881 9890 +Customer#000001000 hzM1shTwWlLuk 454240 71172 -882 +Customer#000001000 hzM1shTwWlLuk 881509 27611 -882 +Customer#000001000 hzM1shTwWlLuk 1005920 225560 -882 +Customer#000001000 hzM1shTwWlLuk 1127618 157563 -882 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.q new file mode 100644 index 000000000..7db2fe6ab --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.q @@ -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,f.c_address,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.sql new file mode 100644 index 000000000..7db2fe6ab --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_inside_outside_flatten.sql @@ -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,f.c_address,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.e new file mode 100644 index 000000000..20f48c650 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.e @@ -0,0 +1,50 @@ +Customer#000000001 IVhzIApeRb ot,c,E 454791 null +Customer#000000001 IVhzIApeRb ot,c,E 579908 null +Customer#000000001 IVhzIApeRb ot,c,E 3868359 null +Customer#000000001 IVhzIApeRb ot,c,E 4273923 null +Customer#000000001 IVhzIApeRb ot,c,E 4808192 null +Customer#000000001 IVhzIApeRb ot,c,E 5133509 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 36422 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 816323 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 859108 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 883557 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 895172 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 916775 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1490087 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1774689 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2126688 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2917345 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3069221 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3354726 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3487745 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3580034 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3916288 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3942656 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4141668 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4243142 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4407621 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4616224 null +Customer#000000100 fptUABXcmkC5Wx 455491 null +Customer#000000100 fptUABXcmkC5Wx 835718 null +Customer#000000100 fptUABXcmkC5Wx 1725762 null +Customer#000000100 fptUABXcmkC5Wx 1777831 null +Customer#000000100 fptUABXcmkC5Wx 1825479 null +Customer#000000100 fptUABXcmkC5Wx 2082146 null +Customer#000000100 fptUABXcmkC5Wx 2169568 null +Customer#000000100 fptUABXcmkC5Wx 2320995 null +Customer#000000100 fptUABXcmkC5Wx 3220646 null +Customer#000000100 fptUABXcmkC5Wx 3316229 null +Customer#000000100 fptUABXcmkC5Wx 3372900 null +Customer#000000100 fptUABXcmkC5Wx 4145986 null +Customer#000000100 fptUABXcmkC5Wx 4596098 null +Customer#000000100 fptUABXcmkC5Wx 4752803 null +Customer#000000100 fptUABXcmkC5Wx 4823748 null +Customer#000000100 fptUABXcmkC5Wx 4940704 null +Customer#000000100 fptUABXcmkC5Wx 5381473 null +Customer#000000100 fptUABXcmkC5Wx 5592131 null +Customer#000000100 fptUABXcmkC5Wx 5724295 null +Customer#000000100 fptUABXcmkC5Wx 5877348 null +Customer#000001000 hzM1shTwWlLuk 454240 null +Customer#000001000 hzM1shTwWlLuk 881509 null +Customer#000001000 hzM1shTwWlLuk 1005920 null +Customer#000001000 hzM1shTwWlLuk 1127618 null diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.q new file mode 100644 index 000000000..378040c6b --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.q @@ -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,customer.c_address, orders.o_id limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.sql new file mode 100644 index 000000000..378040c6b --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside.sql @@ -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,customer.c_address, orders.o_id limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.e new file mode 100644 index 000000000..20f48c650 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.e @@ -0,0 +1,50 @@ +Customer#000000001 IVhzIApeRb ot,c,E 454791 null +Customer#000000001 IVhzIApeRb ot,c,E 579908 null +Customer#000000001 IVhzIApeRb ot,c,E 3868359 null +Customer#000000001 IVhzIApeRb ot,c,E 4273923 null +Customer#000000001 IVhzIApeRb ot,c,E 4808192 null +Customer#000000001 IVhzIApeRb ot,c,E 5133509 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 36422 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 816323 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 859108 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 883557 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 895172 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 916775 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1490087 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 1774689 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2126688 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 2917345 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3069221 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3354726 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3487745 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3580034 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3916288 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 3942656 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4141668 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4243142 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4407621 null +Customer#000000010 6LrEaV6KR6PLVcgl2ArL Q3rqzLzcT1 v2 4616224 null +Customer#000000100 fptUABXcmkC5Wx 455491 null +Customer#000000100 fptUABXcmkC5Wx 835718 null +Customer#000000100 fptUABXcmkC5Wx 1725762 null +Customer#000000100 fptUABXcmkC5Wx 1777831 null +Customer#000000100 fptUABXcmkC5Wx 1825479 null +Customer#000000100 fptUABXcmkC5Wx 2082146 null +Customer#000000100 fptUABXcmkC5Wx 2169568 null +Customer#000000100 fptUABXcmkC5Wx 2320995 null +Customer#000000100 fptUABXcmkC5Wx 3220646 null +Customer#000000100 fptUABXcmkC5Wx 3316229 null +Customer#000000100 fptUABXcmkC5Wx 3372900 null +Customer#000000100 fptUABXcmkC5Wx 4145986 null +Customer#000000100 fptUABXcmkC5Wx 4596098 null +Customer#000000100 fptUABXcmkC5Wx 4752803 null +Customer#000000100 fptUABXcmkC5Wx 4823748 null +Customer#000000100 fptUABXcmkC5Wx 4940704 null +Customer#000000100 fptUABXcmkC5Wx 5381473 null +Customer#000000100 fptUABXcmkC5Wx 5592131 null +Customer#000000100 fptUABXcmkC5Wx 5724295 null +Customer#000000100 fptUABXcmkC5Wx 5877348 null +Customer#000001000 hzM1shTwWlLuk 454240 null +Customer#000001000 hzM1shTwWlLuk 881509 null +Customer#000001000 hzM1shTwWlLuk 1005920 null +Customer#000001000 hzM1shTwWlLuk 1127618 null diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.q new file mode 100644 index 000000000..5e99a54bb --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.q @@ -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,f.c_address,o_orderkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.sql new file mode 100644 index 000000000..5e99a54bb --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_cast_outside_flatten.sql @@ -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,f.c_address,o_orderkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.e new file mode 100644 index 000000000..9e00fa4bc --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.e @@ -0,0 +1,50 @@ +1 Customer#000000001 711.56 454791 74602.81 +1 Customer#000000001 711.56 579908 54048.26 +1 Customer#000000001 711.56 3868359 123076.84 +1 Customer#000000001 711.56 4273923 95911.01 +1 Customer#000000001 711.56 4808192 65478.05 +1 Customer#000000001 711.56 5133509 174645.94 +10 Customer#000000010 2753.54 36422 287837.16 +10 Customer#000000010 2753.54 816323 249097.39 +10 Customer#000000010 2753.54 859108 135312.87 +10 Customer#000000010 2753.54 883557 53855.97 +10 Customer#000000010 2753.54 895172 236806.93 +10 Customer#000000010 2753.54 916775 279937.32 +10 Customer#000000010 2753.54 1490087 227526.57 +10 Customer#000000010 2753.54 1774689 13822.61 +10 Customer#000000010 2753.54 2126688 50998.03 +10 Customer#000000010 2753.54 2917345 52546.37 +10 Customer#000000010 2753.54 3069221 26861.45 +10 Customer#000000010 2753.54 3354726 158148.3 +10 Customer#000000010 2753.54 3487745 193145.38 +10 Customer#000000010 2753.54 3580034 229817.03 +10 Customer#000000010 2753.54 3916288 99925.33 +10 Customer#000000010 2753.54 3942656 327960.68 +10 Customer#000000010 2753.54 4141668 168477.12 +10 Customer#000000010 2753.54 4243142 132159.26 +10 Customer#000000010 2753.54 4407621 93717.95 +10 Customer#000000010 2753.54 4616224 21631.76 +10000 Customer#000010000 59.74 33154 25722.21 +10000 Customer#000010000 59.74 919269 142611.24 +10000 Customer#000010000 59.74 946464 135209.63 +10000 Customer#000010000 59.74 1050179 210207.09 +10000 Customer#000010000 59.74 1476357 47430.56 +10000 Customer#000010000 59.74 1546855 58754.98 +10000 Customer#000010000 59.74 1908642 208788.99 +10000 Customer#000010000 59.74 2235591 221368.56 +10000 Customer#000010000 59.74 2583430 264474.65 +10000 Customer#000010000 59.74 2948387 256186.76 +10000 Customer#000010000 59.74 2970656 200944.69 +10000 Customer#000010000 59.74 3011811 222633.3 +10000 Customer#000010000 59.74 3024770 40711.5 +10000 Customer#000010000 59.74 3401060 182742.02 +10000 Customer#000010000 59.74 3596832 211570.15 +10000 Customer#000010000 59.74 4106727 126088.23 +10000 Customer#000010000 59.74 4436102 39566.42 +10000 Customer#000010000 59.74 4947489 200752.0 +10000 Customer#000010000 59.74 4971078 33565.87 +10000 Customer#000010000 59.74 5250342 335758.08 +100000 Customer#000100000 4840.82 672320 82257.94 +100000 Customer#000100000 4840.82 981575 192548.27 +100000 Customer#000100000 4840.82 1702785 40094.29 +100000 Customer#000100000 4840.82 2161350 113385.17 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.q new file mode 100644 index 000000000..bf31bccdb --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.q @@ -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,customer.c_acctbal,orders.o_orderkey, orders.o_totalprice limit 50 ; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.sql new file mode 100644 index 000000000..bf31bccdb --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside.sql @@ -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,customer.c_acctbal,orders.o_orderkey, orders.o_totalprice limit 50 ; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.e new file mode 100644 index 000000000..9e00fa4bc --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.e @@ -0,0 +1,50 @@ +1 Customer#000000001 711.56 454791 74602.81 +1 Customer#000000001 711.56 579908 54048.26 +1 Customer#000000001 711.56 3868359 123076.84 +1 Customer#000000001 711.56 4273923 95911.01 +1 Customer#000000001 711.56 4808192 65478.05 +1 Customer#000000001 711.56 5133509 174645.94 +10 Customer#000000010 2753.54 36422 287837.16 +10 Customer#000000010 2753.54 816323 249097.39 +10 Customer#000000010 2753.54 859108 135312.87 +10 Customer#000000010 2753.54 883557 53855.97 +10 Customer#000000010 2753.54 895172 236806.93 +10 Customer#000000010 2753.54 916775 279937.32 +10 Customer#000000010 2753.54 1490087 227526.57 +10 Customer#000000010 2753.54 1774689 13822.61 +10 Customer#000000010 2753.54 2126688 50998.03 +10 Customer#000000010 2753.54 2917345 52546.37 +10 Customer#000000010 2753.54 3069221 26861.45 +10 Customer#000000010 2753.54 3354726 158148.3 +10 Customer#000000010 2753.54 3487745 193145.38 +10 Customer#000000010 2753.54 3580034 229817.03 +10 Customer#000000010 2753.54 3916288 99925.33 +10 Customer#000000010 2753.54 3942656 327960.68 +10 Customer#000000010 2753.54 4141668 168477.12 +10 Customer#000000010 2753.54 4243142 132159.26 +10 Customer#000000010 2753.54 4407621 93717.95 +10 Customer#000000010 2753.54 4616224 21631.76 +10000 Customer#000010000 59.74 33154 25722.21 +10000 Customer#000010000 59.74 919269 142611.24 +10000 Customer#000010000 59.74 946464 135209.63 +10000 Customer#000010000 59.74 1050179 210207.09 +10000 Customer#000010000 59.74 1476357 47430.56 +10000 Customer#000010000 59.74 1546855 58754.98 +10000 Customer#000010000 59.74 1908642 208788.99 +10000 Customer#000010000 59.74 2235591 221368.56 +10000 Customer#000010000 59.74 2583430 264474.65 +10000 Customer#000010000 59.74 2948387 256186.76 +10000 Customer#000010000 59.74 2970656 200944.69 +10000 Customer#000010000 59.74 3011811 222633.3 +10000 Customer#000010000 59.74 3024770 40711.5 +10000 Customer#000010000 59.74 3401060 182742.02 +10000 Customer#000010000 59.74 3596832 211570.15 +10000 Customer#000010000 59.74 4106727 126088.23 +10000 Customer#000010000 59.74 4436102 39566.42 +10000 Customer#000010000 59.74 4947489 200752.0 +10000 Customer#000010000 59.74 4971078 33565.87 +10000 Customer#000010000 59.74 5250342 335758.08 +100000 Customer#000100000 4840.82 672320 82257.94 +100000 Customer#000100000 4840.82 981575 192548.27 +100000 Customer#000100000 4840.82 1702785 40094.29 +100000 Customer#000100000 4840.82 2161350 113385.17 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.q new file mode 100644 index 000000000..51f067027 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.q @@ -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,f.c_acctbal,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.sql new file mode 100644 index 000000000..51f067027 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_between_outside_flatten.sql @@ -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,f.c_acctbal,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.q new file mode 100644 index 000000000..61281bf11 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.q @@ -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,orders.o_id, orders.o_amount,orders.O_ORDERPRIORITY limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.sql new file mode 100644 index 000000000..61281bf11 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside.sql @@ -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,orders.o_id, orders.o_amount,orders.O_ORDERPRIORITY limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.e new file mode 100644 index 000000000..e69de29bb diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.q new file mode 100644 index 000000000..27800d661 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.q @@ -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,o_orderkey,o_totalprice,f.o.O_ORDERPRIORITY limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.sql new file mode 100644 index 000000000..27800d661 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_and_like_inside_flatten.sql @@ -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,o_orderkey,o_totalprice,f.o.O_ORDERPRIORITY limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.e new file mode 100644 index 000000000..9862039b7 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.e @@ -0,0 +1,2 @@ +101276 Customer#000101276 1863171 82657.72 +120376 Customer#000120376 4245957 180309.76 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.q new file mode 100644 index 000000000..9685abdd2 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.q @@ -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,orders.o_orderkey, orders.o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.sql new file mode 100644 index 000000000..9685abdd2 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside.sql @@ -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,orders.o_orderkey, orders.o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.e new file mode 100644 index 000000000..92ffb1eb5 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.e @@ -0,0 +1 @@ +101276 Customer#000101276 576.85 1863171 82657.72 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.q new file mode 100644 index 000000000..fe89101f8 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.q @@ -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,customer.c_acctbal,orders.o_id, orders.o_amount limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.sql new file mode 100644 index 000000000..fe89101f8 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside.sql @@ -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,customer.c_acctbal,orders.o_id, orders.o_amount limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.e new file mode 100644 index 000000000..92ffb1eb5 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.e @@ -0,0 +1 @@ +101276 Customer#000101276 576.85 1863171 82657.72 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.q new file mode 100644 index 000000000..a81254bbf --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.q @@ -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,f.c_acctbal,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.sql new file mode 100644 index 000000000..a81254bbf --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_between_outside_flatten.sql @@ -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,f.c_acctbal,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.e new file mode 100644 index 000000000..9862039b7 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.e @@ -0,0 +1,2 @@ +101276 Customer#000101276 1863171 82657.72 +120376 Customer#000120376 4245957 180309.76 diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.q new file mode 100644 index 000000000..76833a4d9 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.q @@ -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,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.sql new file mode 100644 index 000000000..76833a4d9 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_in_inside_flatten.sql @@ -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,o_orderkey,o_totalprice limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.e new file mode 100644 index 000000000..3bd5ef858 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.e @@ -0,0 +1,50 @@ +100019 Customer#000100019 2886916 276149.86 6654.57 AUTOMOBILE +100019 Customer#000100019 5335846 201826.39 6654.57 AUTOMOBILE +100019 Customer#000100019 1260100 169448.11 6654.57 AUTOMOBILE +100019 Customer#000100019 2930178 222869.13 6654.57 AUTOMOBILE +100019 Customer#000100019 4598209 31343.96 6654.57 AUTOMOBILE +100019 Customer#000100019 4055750 215015.14 6654.57 AUTOMOBILE +100019 Customer#000100019 1955559 136377.5 6654.57 AUTOMOBILE +100019 Customer#000100019 496452 306464.08 6654.57 AUTOMOBILE +100019 Customer#000100019 3743716 100522.98 6654.57 AUTOMOBILE +100019 Customer#000100019 3595715 164198.79 6654.57 AUTOMOBILE +100019 Customer#000100019 453509 145317.03 6654.57 AUTOMOBILE +100019 Customer#000100019 4879586 146435.83 6654.57 AUTOMOBILE +100019 Customer#000100019 714722 166631.49 6654.57 AUTOMOBILE +100027 Customer#000100027 2173633 131377.72 1343.46 AUTOMOBILE +100027 Customer#000100027 3472516 242704.42 1343.46 AUTOMOBILE +100027 Customer#000100027 3557441 248766.72 1343.46 AUTOMOBILE +100027 Customer#000100027 334787 75880.7 1343.46 AUTOMOBILE +100027 Customer#000100027 4986919 43428.59 1343.46 AUTOMOBILE +100027 Customer#000100027 5144742 184889.44 1343.46 AUTOMOBILE +100027 Customer#000100027 3571142 69712.35 1343.46 AUTOMOBILE +100027 Customer#000100027 4356678 117105.44 1343.46 AUTOMOBILE +100027 Customer#000100027 4473863 112257.21 1343.46 AUTOMOBILE +100027 Customer#000100027 4387879 98019.22 1343.46 AUTOMOBILE +100027 Customer#000100027 2263654 245376.32 1343.46 AUTOMOBILE +100027 Customer#000100027 1716452 49245.0 1343.46 AUTOMOBILE +100027 Customer#000100027 2911140 179407.59 1343.46 AUTOMOBILE +100027 Customer#000100027 2951812 96225.94 1343.46 AUTOMOBILE +100027 Customer#000100027 189538 300881.61 1343.46 AUTOMOBILE +100027 Customer#000100027 5402918 317801.29 1343.46 AUTOMOBILE +100027 Customer#000100027 5462372 112119.69 1343.46 AUTOMOBILE +100028 Customer#000100028 108064 263053.8 5559.62 AUTOMOBILE +100028 Customer#000100028 3689188 86995.68 5559.62 AUTOMOBILE +100028 Customer#000100028 2241284 22429.1 5559.62 AUTOMOBILE +100028 Customer#000100028 5430053 30704.88 5559.62 AUTOMOBILE +100028 Customer#000100028 3821029 202461.74 5559.62 AUTOMOBILE +100034 Customer#000100034 2520356 254880.04 5993.73 AUTOMOBILE +100034 Customer#000100034 1798628 194719.27 5993.73 AUTOMOBILE +100034 Customer#000100034 5852389 332131.0 5993.73 AUTOMOBILE +100034 Customer#000100034 271012 391698.04 5993.73 AUTOMOBILE +100034 Customer#000100034 3076323 170093.53 5993.73 AUTOMOBILE +100034 Customer#000100034 845828 86523.79 5993.73 AUTOMOBILE +100034 Customer#000100034 4272545 153494.86 5993.73 AUTOMOBILE +100034 Customer#000100034 937894 177124.1 5993.73 AUTOMOBILE +100051 Customer#000100051 3447394 284844.18 3560.93 AUTOMOBILE +100051 Customer#000100051 3733539 159458.48 3560.93 AUTOMOBILE +100051 Customer#000100051 3364583 54168.88 3560.93 AUTOMOBILE +100051 Customer#000100051 3784551 61425.39 3560.93 AUTOMOBILE +100051 Customer#000100051 2648834 300785.71 3560.93 AUTOMOBILE +100051 Customer#000100051 2718467 58061.07 3560.93 AUTOMOBILE +100051 Customer#000100051 2400294 5881.44 3560.93 AUTOMOBILE diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.q new file mode 100644 index 000000000..e5199a0a6 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.q @@ -0,0 +1,3 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment +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 WHERE customer.c_acctbal between 0 and 9000 AND customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.sql new file mode 100644 index 000000000..e5199a0a6 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside.sql @@ -0,0 +1,3 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment +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 WHERE customer.c_acctbal between 0 and 9000 AND customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.e new file mode 100644 index 000000000..3bd5ef858 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.e @@ -0,0 +1,50 @@ +100019 Customer#000100019 2886916 276149.86 6654.57 AUTOMOBILE +100019 Customer#000100019 5335846 201826.39 6654.57 AUTOMOBILE +100019 Customer#000100019 1260100 169448.11 6654.57 AUTOMOBILE +100019 Customer#000100019 2930178 222869.13 6654.57 AUTOMOBILE +100019 Customer#000100019 4598209 31343.96 6654.57 AUTOMOBILE +100019 Customer#000100019 4055750 215015.14 6654.57 AUTOMOBILE +100019 Customer#000100019 1955559 136377.5 6654.57 AUTOMOBILE +100019 Customer#000100019 496452 306464.08 6654.57 AUTOMOBILE +100019 Customer#000100019 3743716 100522.98 6654.57 AUTOMOBILE +100019 Customer#000100019 3595715 164198.79 6654.57 AUTOMOBILE +100019 Customer#000100019 453509 145317.03 6654.57 AUTOMOBILE +100019 Customer#000100019 4879586 146435.83 6654.57 AUTOMOBILE +100019 Customer#000100019 714722 166631.49 6654.57 AUTOMOBILE +100027 Customer#000100027 2173633 131377.72 1343.46 AUTOMOBILE +100027 Customer#000100027 3472516 242704.42 1343.46 AUTOMOBILE +100027 Customer#000100027 3557441 248766.72 1343.46 AUTOMOBILE +100027 Customer#000100027 334787 75880.7 1343.46 AUTOMOBILE +100027 Customer#000100027 4986919 43428.59 1343.46 AUTOMOBILE +100027 Customer#000100027 5144742 184889.44 1343.46 AUTOMOBILE +100027 Customer#000100027 3571142 69712.35 1343.46 AUTOMOBILE +100027 Customer#000100027 4356678 117105.44 1343.46 AUTOMOBILE +100027 Customer#000100027 4473863 112257.21 1343.46 AUTOMOBILE +100027 Customer#000100027 4387879 98019.22 1343.46 AUTOMOBILE +100027 Customer#000100027 2263654 245376.32 1343.46 AUTOMOBILE +100027 Customer#000100027 1716452 49245.0 1343.46 AUTOMOBILE +100027 Customer#000100027 2911140 179407.59 1343.46 AUTOMOBILE +100027 Customer#000100027 2951812 96225.94 1343.46 AUTOMOBILE +100027 Customer#000100027 189538 300881.61 1343.46 AUTOMOBILE +100027 Customer#000100027 5402918 317801.29 1343.46 AUTOMOBILE +100027 Customer#000100027 5462372 112119.69 1343.46 AUTOMOBILE +100028 Customer#000100028 108064 263053.8 5559.62 AUTOMOBILE +100028 Customer#000100028 3689188 86995.68 5559.62 AUTOMOBILE +100028 Customer#000100028 2241284 22429.1 5559.62 AUTOMOBILE +100028 Customer#000100028 5430053 30704.88 5559.62 AUTOMOBILE +100028 Customer#000100028 3821029 202461.74 5559.62 AUTOMOBILE +100034 Customer#000100034 2520356 254880.04 5993.73 AUTOMOBILE +100034 Customer#000100034 1798628 194719.27 5993.73 AUTOMOBILE +100034 Customer#000100034 5852389 332131.0 5993.73 AUTOMOBILE +100034 Customer#000100034 271012 391698.04 5993.73 AUTOMOBILE +100034 Customer#000100034 3076323 170093.53 5993.73 AUTOMOBILE +100034 Customer#000100034 845828 86523.79 5993.73 AUTOMOBILE +100034 Customer#000100034 4272545 153494.86 5993.73 AUTOMOBILE +100034 Customer#000100034 937894 177124.1 5993.73 AUTOMOBILE +100051 Customer#000100051 3447394 284844.18 3560.93 AUTOMOBILE +100051 Customer#000100051 3733539 159458.48 3560.93 AUTOMOBILE +100051 Customer#000100051 3364583 54168.88 3560.93 AUTOMOBILE +100051 Customer#000100051 3784551 61425.39 3560.93 AUTOMOBILE +100051 Customer#000100051 2648834 300785.71 3560.93 AUTOMOBILE +100051 Customer#000100051 2718467 58061.07 3560.93 AUTOMOBILE +100051 Customer#000100051 2400294 5881.44 3560.93 AUTOMOBILE diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.q new file mode 100644 index 000000000..1542d6b4f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.q @@ -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.c_acctbal, f.c_mktsegment from (select c_custkey, c_name,c_acctbal,c_mktsegment, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' AND f.c_acctbal between 0 and 9000 order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.sql new file mode 100644 index 000000000..1542d6b4f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_and_between_outside_flatten.sql @@ -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.c_acctbal, f.c_mktsegment from (select c_custkey, c_name,c_acctbal,c_mktsegment, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' AND f.c_acctbal between 0 and 9000 order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.e new file mode 100644 index 000000000..a764d9382 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.e @@ -0,0 +1,50 @@ +1 Customer#000000001 454791 74602.81 1-URGENT +1 Customer#000000001 5133509 174645.94 1-URGENT +10 Customer#000000010 895172 236806.93 1-URGENT +10 Customer#000000010 916775 279937.32 1-URGENT +10 Customer#000000010 3487745 193145.38 1-URGENT +10 Customer#000000010 4141668 168477.12 1-URGENT +100 Customer#000000100 3220646 71383.85 1-URGENT +100 Customer#000000100 3316229 140603.63 1-URGENT +100 Customer#000000100 4823748 102948.74 1-URGENT +100 Customer#000000100 5877348 224880.6 1-URGENT +1000 Customer#000001000 1005920 225560.39 1-URGENT +1000 Customer#000001000 3910501 158661.74 1-URGENT +1000 Customer#000001000 4062211 123048.41 1-URGENT +1000 Customer#000001000 5532387 168694.1 1-URGENT +1000 Customer#000001000 5870976 81661.16 1-URGENT +10000 Customer#000010000 33154 25722.21 1-URGENT +10000 Customer#000010000 1050179 210207.09 1-URGENT +10000 Customer#000010000 4436102 39566.42 1-URGENT +100000 Customer#000100000 1702785 40094.29 1-URGENT +100000 Customer#000100000 3182631 288890.34 1-URGENT +100000 Customer#000100000 4962151 243579.36 1-URGENT +100000 Customer#000100000 5667781 3998.87 1-URGENT +100001 Customer#000100001 905155 41693.98 1-URGENT +100001 Customer#000100001 4390148 84730.77 1-URGENT +100003 Customer#000100003 957031 317256.63 1-URGENT +100003 Customer#000100003 1630214 234119.88 1-URGENT +100003 Customer#000100003 1655814 175366.18 1-URGENT +100003 Customer#000100003 1868385 125842.68 1-URGENT +100003 Customer#000100003 5350880 178290.31 1-URGENT +100004 Customer#000100004 1310851 136181.37 1-URGENT +100004 Customer#000100004 3863076 211366.81 1-URGENT +100006 Customer#000100006 1997377 46073.17 1-URGENT +100006 Customer#000100006 3873313 37330.41 1-URGENT +100007 Customer#000100007 236448 38662.93 1-URGENT +100007 Customer#000100007 1117506 105012.92 1-URGENT +100007 Customer#000100007 1202598 55610.91 1-URGENT +100007 Customer#000100007 3390245 18674.71 1-URGENT +100007 Customer#000100007 4208419 251328.35 1-URGENT +100009 Customer#000100009 3919143 185273.37 1-URGENT +100009 Customer#000100009 4422496 80613.6 1-URGENT +10001 Customer#000010001 3331170 127238.12 1-URGENT +10001 Customer#000010001 3470246 238472.55 1-URGENT +10001 Customer#000010001 4631716 158265.12 1-URGENT +100010 Customer#000100010 2991841 22938.78 1-URGENT +100012 Customer#000100012 10881 227104.65 1-URGENT +100012 Customer#000100012 351650 146158.64 1-URGENT +100015 Customer#000100015 584166 176868.72 1-URGENT +100015 Customer#000100015 751618 252478.83 1-URGENT +100015 Customer#000100015 1795525 227229.56 1-URGENT +100015 Customer#000100015 3229319 41803.03 1-URGENT diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.q new file mode 100644 index 000000000..8aa00ca01 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.q @@ -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_ORDERPRIORITY like '%URGENT%' )orders order by customer.c_custkey,orders.o_id, orders.o_amount,ORDERS.O_ORDERPRIORITY limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.sql new file mode 100644 index 000000000..6685d0810 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside.sql @@ -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_ORDERPRIORITY like '%URGENT%' )orders order by customer.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.e new file mode 100644 index 000000000..a764d9382 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.e @@ -0,0 +1,50 @@ +1 Customer#000000001 454791 74602.81 1-URGENT +1 Customer#000000001 5133509 174645.94 1-URGENT +10 Customer#000000010 895172 236806.93 1-URGENT +10 Customer#000000010 916775 279937.32 1-URGENT +10 Customer#000000010 3487745 193145.38 1-URGENT +10 Customer#000000010 4141668 168477.12 1-URGENT +100 Customer#000000100 3220646 71383.85 1-URGENT +100 Customer#000000100 3316229 140603.63 1-URGENT +100 Customer#000000100 4823748 102948.74 1-URGENT +100 Customer#000000100 5877348 224880.6 1-URGENT +1000 Customer#000001000 1005920 225560.39 1-URGENT +1000 Customer#000001000 3910501 158661.74 1-URGENT +1000 Customer#000001000 4062211 123048.41 1-URGENT +1000 Customer#000001000 5532387 168694.1 1-URGENT +1000 Customer#000001000 5870976 81661.16 1-URGENT +10000 Customer#000010000 33154 25722.21 1-URGENT +10000 Customer#000010000 1050179 210207.09 1-URGENT +10000 Customer#000010000 4436102 39566.42 1-URGENT +100000 Customer#000100000 1702785 40094.29 1-URGENT +100000 Customer#000100000 3182631 288890.34 1-URGENT +100000 Customer#000100000 4962151 243579.36 1-URGENT +100000 Customer#000100000 5667781 3998.87 1-URGENT +100001 Customer#000100001 905155 41693.98 1-URGENT +100001 Customer#000100001 4390148 84730.77 1-URGENT +100003 Customer#000100003 957031 317256.63 1-URGENT +100003 Customer#000100003 1630214 234119.88 1-URGENT +100003 Customer#000100003 1655814 175366.18 1-URGENT +100003 Customer#000100003 1868385 125842.68 1-URGENT +100003 Customer#000100003 5350880 178290.31 1-URGENT +100004 Customer#000100004 1310851 136181.37 1-URGENT +100004 Customer#000100004 3863076 211366.81 1-URGENT +100006 Customer#000100006 1997377 46073.17 1-URGENT +100006 Customer#000100006 3873313 37330.41 1-URGENT +100007 Customer#000100007 236448 38662.93 1-URGENT +100007 Customer#000100007 1117506 105012.92 1-URGENT +100007 Customer#000100007 1202598 55610.91 1-URGENT +100007 Customer#000100007 3390245 18674.71 1-URGENT +100007 Customer#000100007 4208419 251328.35 1-URGENT +100009 Customer#000100009 3919143 185273.37 1-URGENT +100009 Customer#000100009 4422496 80613.6 1-URGENT +10001 Customer#000010001 3331170 127238.12 1-URGENT +10001 Customer#000010001 3470246 238472.55 1-URGENT +10001 Customer#000010001 4631716 158265.12 1-URGENT +100010 Customer#000100010 2991841 22938.78 1-URGENT +100012 Customer#000100012 10881 227104.65 1-URGENT +100012 Customer#000100012 351650 146158.64 1-URGENT +100015 Customer#000100015 584166 176868.72 1-URGENT +100015 Customer#000100015 751618 252478.83 1-URGENT +100015 Customer#000100015 1795525 227229.56 1-URGENT +100015 Customer#000100015 3229319 41803.03 1-URGENT diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.q new file mode 100644 index 000000000..df95f2e86 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.q @@ -0,0 +1 @@ +select f.c_custkey, f.c_name, f.o.o_orderkey as o_orderkey,f.o.o_totalprice as o_amount, f.o.O_ORDERPRIORITY as O_ORDERPRIORITY from (select c_custkey, c_name, flatten(c_orders) as o from customer) f WHERE f.o.O_ORDERPRIORITY like '%URGENT%' order by f.c_custkey,o_orderkey,o_amount,O_ORDERPRIORITY limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.sql new file mode 100644 index 000000000..a38586a0f --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_inside_flatten.sql @@ -0,0 +1 @@ +select f.c_custkey, f.c_name, f.o.o_orderkey as o_orderkey,f.o.o_totalprice as o_amount, f.o.O_ORDERPRIORITY as O_ORDERPRIORITY from (select c_custkey, c_name, flatten(c_orders) as o from customer) f WHERE f.o.O_ORDERPRIORITY like '%URGENT%' order by f.c_custkey limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside.e new file mode 100644 index 000000000..edbffea46 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside.e @@ -0,0 +1,50 @@ +1 Customer#000000001 454791 74602.81 711.56 BUILDING +1 Customer#000000001 579908 54048.26 711.56 BUILDING +1 Customer#000000001 3868359 123076.84 711.56 BUILDING +1 Customer#000000001 4273923 95911.01 711.56 BUILDING +1 Customer#000000001 4808192 65478.05 711.56 BUILDING +1 Customer#000000001 5133509 174645.94 711.56 BUILDING +10 Customer#000000010 36422 287837.16 2753.54 HOUSEHOLD +10 Customer#000000010 816323 249097.39 2753.54 HOUSEHOLD +10 Customer#000000010 859108 135312.87 2753.54 HOUSEHOLD +10 Customer#000000010 883557 53855.97 2753.54 HOUSEHOLD +10 Customer#000000010 895172 236806.93 2753.54 HOUSEHOLD +10 Customer#000000010 916775 279937.32 2753.54 HOUSEHOLD +10 Customer#000000010 1490087 227526.57 2753.54 HOUSEHOLD +10 Customer#000000010 1774689 13822.61 2753.54 HOUSEHOLD +10 Customer#000000010 2126688 50998.03 2753.54 HOUSEHOLD +10 Customer#000000010 2917345 52546.37 2753.54 HOUSEHOLD +10 Customer#000000010 3069221 26861.45 2753.54 HOUSEHOLD +10 Customer#000000010 3354726 158148.3 2753.54 HOUSEHOLD +10 Customer#000000010 3487745 193145.38 2753.54 HOUSEHOLD +10 Customer#000000010 3580034 229817.03 2753.54 HOUSEHOLD +10 Customer#000000010 3916288 99925.33 2753.54 HOUSEHOLD +10 Customer#000000010 3942656 327960.68 2753.54 HOUSEHOLD +10 Customer#000000010 4141668 168477.12 2753.54 HOUSEHOLD +10 Customer#000000010 4243142 132159.26 2753.54 HOUSEHOLD +10 Customer#000000010 4407621 93717.95 2753.54 HOUSEHOLD +10 Customer#000000010 4616224 21631.76 2753.54 HOUSEHOLD +10000 Customer#000010000 33154 25722.21 59.74 FURNITURE +10000 Customer#000010000 919269 142611.24 59.74 FURNITURE +10000 Customer#000010000 946464 135209.63 59.74 FURNITURE +10000 Customer#000010000 1050179 210207.09 59.74 FURNITURE +10000 Customer#000010000 1476357 47430.56 59.74 FURNITURE +10000 Customer#000010000 1546855 58754.98 59.74 FURNITURE +10000 Customer#000010000 1908642 208788.99 59.74 FURNITURE +10000 Customer#000010000 2235591 221368.56 59.74 FURNITURE +10000 Customer#000010000 2583430 264474.65 59.74 FURNITURE +10000 Customer#000010000 2948387 256186.76 59.74 FURNITURE +10000 Customer#000010000 2970656 200944.69 59.74 FURNITURE +10000 Customer#000010000 3011811 222633.3 59.74 FURNITURE +10000 Customer#000010000 3024770 40711.5 59.74 FURNITURE +10000 Customer#000010000 3401060 182742.02 59.74 FURNITURE +10000 Customer#000010000 3596832 211570.15 59.74 FURNITURE +10000 Customer#000010000 4106727 126088.23 59.74 FURNITURE +10000 Customer#000010000 4436102 39566.42 59.74 FURNITURE +10000 Customer#000010000 4947489 200752.0 59.74 FURNITURE +10000 Customer#000010000 4971078 33565.87 59.74 FURNITURE +10000 Customer#000010000 5250342 335758.08 59.74 FURNITURE +100000 Customer#000100000 672320 82257.94 4840.82 HOUSEHOLD +100000 Customer#000100000 981575 192548.27 4840.82 HOUSEHOLD +100000 Customer#000100000 1702785 40094.29 4840.82 HOUSEHOLD +100000 Customer#000100000 2161350 113385.17 4840.82 HOUSEHOLD diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside.q new file mode 100644 index 000000000..92d0c8b53 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside.q @@ -0,0 +1 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment 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 WHERE customer.c_acctbal between 0 and 9000 OR customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey,orders.o_id, orders.o_amount ,customer.c_acctbal,customer.c_mktsegment limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.e new file mode 100644 index 000000000..edbffea46 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.e @@ -0,0 +1,50 @@ +1 Customer#000000001 454791 74602.81 711.56 BUILDING +1 Customer#000000001 579908 54048.26 711.56 BUILDING +1 Customer#000000001 3868359 123076.84 711.56 BUILDING +1 Customer#000000001 4273923 95911.01 711.56 BUILDING +1 Customer#000000001 4808192 65478.05 711.56 BUILDING +1 Customer#000000001 5133509 174645.94 711.56 BUILDING +10 Customer#000000010 36422 287837.16 2753.54 HOUSEHOLD +10 Customer#000000010 816323 249097.39 2753.54 HOUSEHOLD +10 Customer#000000010 859108 135312.87 2753.54 HOUSEHOLD +10 Customer#000000010 883557 53855.97 2753.54 HOUSEHOLD +10 Customer#000000010 895172 236806.93 2753.54 HOUSEHOLD +10 Customer#000000010 916775 279937.32 2753.54 HOUSEHOLD +10 Customer#000000010 1490087 227526.57 2753.54 HOUSEHOLD +10 Customer#000000010 1774689 13822.61 2753.54 HOUSEHOLD +10 Customer#000000010 2126688 50998.03 2753.54 HOUSEHOLD +10 Customer#000000010 2917345 52546.37 2753.54 HOUSEHOLD +10 Customer#000000010 3069221 26861.45 2753.54 HOUSEHOLD +10 Customer#000000010 3354726 158148.3 2753.54 HOUSEHOLD +10 Customer#000000010 3487745 193145.38 2753.54 HOUSEHOLD +10 Customer#000000010 3580034 229817.03 2753.54 HOUSEHOLD +10 Customer#000000010 3916288 99925.33 2753.54 HOUSEHOLD +10 Customer#000000010 3942656 327960.68 2753.54 HOUSEHOLD +10 Customer#000000010 4141668 168477.12 2753.54 HOUSEHOLD +10 Customer#000000010 4243142 132159.26 2753.54 HOUSEHOLD +10 Customer#000000010 4407621 93717.95 2753.54 HOUSEHOLD +10 Customer#000000010 4616224 21631.76 2753.54 HOUSEHOLD +10000 Customer#000010000 33154 25722.21 59.74 FURNITURE +10000 Customer#000010000 919269 142611.24 59.74 FURNITURE +10000 Customer#000010000 946464 135209.63 59.74 FURNITURE +10000 Customer#000010000 1050179 210207.09 59.74 FURNITURE +10000 Customer#000010000 1476357 47430.56 59.74 FURNITURE +10000 Customer#000010000 1546855 58754.98 59.74 FURNITURE +10000 Customer#000010000 1908642 208788.99 59.74 FURNITURE +10000 Customer#000010000 2235591 221368.56 59.74 FURNITURE +10000 Customer#000010000 2583430 264474.65 59.74 FURNITURE +10000 Customer#000010000 2948387 256186.76 59.74 FURNITURE +10000 Customer#000010000 2970656 200944.69 59.74 FURNITURE +10000 Customer#000010000 3011811 222633.3 59.74 FURNITURE +10000 Customer#000010000 3024770 40711.5 59.74 FURNITURE +10000 Customer#000010000 3401060 182742.02 59.74 FURNITURE +10000 Customer#000010000 3596832 211570.15 59.74 FURNITURE +10000 Customer#000010000 4106727 126088.23 59.74 FURNITURE +10000 Customer#000010000 4436102 39566.42 59.74 FURNITURE +10000 Customer#000010000 4947489 200752.0 59.74 FURNITURE +10000 Customer#000010000 4971078 33565.87 59.74 FURNITURE +10000 Customer#000010000 5250342 335758.08 59.74 FURNITURE +100000 Customer#000100000 672320 82257.94 4840.82 HOUSEHOLD +100000 Customer#000100000 981575 192548.27 4840.82 HOUSEHOLD +100000 Customer#000100000 1702785 40094.29 4840.82 HOUSEHOLD +100000 Customer#000100000 2161350 113385.17 4840.82 HOUSEHOLD diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.q new file mode 100644 index 000000000..7d76f5565 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.q @@ -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.c_acctbal, f.c_mktsegment from (select c_custkey, c_name,c_mktsegment,c_acctbal, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' OR f.c_acctbal between 0 and 9000 order by f.c_custkey,o_orderkey,o_totalprice,f.c_acctbal, f.c_mktsegment limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.sql new file mode 100644 index 000000000..7d76f5565 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_or_between_outside_flatten.sql @@ -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.c_acctbal, f.c_mktsegment from (select c_custkey, c_name,c_mktsegment,c_acctbal, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' OR f.c_acctbal between 0 and 9000 order by f.c_custkey,o_orderkey,o_totalprice,f.c_acctbal, f.c_mktsegment limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.e new file mode 100644 index 000000000..b665d8c79 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.e @@ -0,0 +1,50 @@ +100019 Customer#000100019 453509 145317.03 AUTOMOBILE +100019 Customer#000100019 496452 306464.08 AUTOMOBILE +100019 Customer#000100019 714722 166631.49 AUTOMOBILE +100019 Customer#000100019 1260100 169448.11 AUTOMOBILE +100019 Customer#000100019 1955559 136377.5 AUTOMOBILE +100019 Customer#000100019 2886916 276149.86 AUTOMOBILE +100019 Customer#000100019 2930178 222869.13 AUTOMOBILE +100019 Customer#000100019 3595715 164198.79 AUTOMOBILE +100019 Customer#000100019 3743716 100522.98 AUTOMOBILE +100019 Customer#000100019 4055750 215015.14 AUTOMOBILE +100019 Customer#000100019 4598209 31343.96 AUTOMOBILE +100019 Customer#000100019 4879586 146435.83 AUTOMOBILE +100019 Customer#000100019 5335846 201826.39 AUTOMOBILE +100027 Customer#000100027 189538 300881.61 AUTOMOBILE +100027 Customer#000100027 334787 75880.7 AUTOMOBILE +100027 Customer#000100027 1716452 49245.0 AUTOMOBILE +100027 Customer#000100027 2173633 131377.72 AUTOMOBILE +100027 Customer#000100027 2263654 245376.32 AUTOMOBILE +100027 Customer#000100027 2911140 179407.59 AUTOMOBILE +100027 Customer#000100027 2951812 96225.94 AUTOMOBILE +100027 Customer#000100027 3472516 242704.42 AUTOMOBILE +100027 Customer#000100027 3557441 248766.72 AUTOMOBILE +100027 Customer#000100027 3571142 69712.35 AUTOMOBILE +100027 Customer#000100027 4356678 117105.44 AUTOMOBILE +100027 Customer#000100027 4387879 98019.22 AUTOMOBILE +100027 Customer#000100027 4473863 112257.21 AUTOMOBILE +100027 Customer#000100027 4986919 43428.59 AUTOMOBILE +100027 Customer#000100027 5144742 184889.44 AUTOMOBILE +100027 Customer#000100027 5402918 317801.29 AUTOMOBILE +100027 Customer#000100027 5462372 112119.69 AUTOMOBILE +100028 Customer#000100028 108064 263053.8 AUTOMOBILE +100028 Customer#000100028 2241284 22429.1 AUTOMOBILE +100028 Customer#000100028 3689188 86995.68 AUTOMOBILE +100028 Customer#000100028 3821029 202461.74 AUTOMOBILE +100028 Customer#000100028 5430053 30704.88 AUTOMOBILE +10003 Customer#000010003 397760 328553.49 AUTOMOBILE +10003 Customer#000010003 592196 258629.93 AUTOMOBILE +10003 Customer#000010003 721924 149696.32 AUTOMOBILE +10003 Customer#000010003 1067205 140203.36 AUTOMOBILE +10003 Customer#000010003 1518242 75779.19 AUTOMOBILE +10003 Customer#000010003 1622276 79117.45 AUTOMOBILE +10003 Customer#000010003 1683110 110544.09 AUTOMOBILE +10003 Customer#000010003 1860708 102134.73 AUTOMOBILE +10003 Customer#000010003 2375207 206056.83 AUTOMOBILE +10003 Customer#000010003 3000645 237774.83 AUTOMOBILE +10003 Customer#000010003 3009191 24912.01 AUTOMOBILE +10003 Customer#000010003 3355648 317479.39 AUTOMOBILE +10003 Customer#000010003 3436932 118569.44 AUTOMOBILE +10003 Customer#000010003 3640578 6416.07 AUTOMOBILE +10003 Customer#000010003 4688453 368393.79 AUTOMOBILE diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.q new file mode 100644 index 000000000..e0ddfc451 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.q @@ -0,0 +1,3 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_mktsegment +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 WHERE customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey,orders.o_id, orders.o_amount ,customer.c_mktsegment limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.sql new file mode 100644 index 000000000..e0ddfc451 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside.sql @@ -0,0 +1,3 @@ +SELECT customer.c_custkey, customer.c_name,orders.o_id, orders.o_amount ,customer.c_mktsegment +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 WHERE customer.c_mktsegment like '%AUTOMOBILE%' order by customer.c_custkey,orders.o_id, orders.o_amount ,customer.c_mktsegment limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.e b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.e new file mode 100644 index 000000000..b665d8c79 --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.e @@ -0,0 +1,50 @@ +100019 Customer#000100019 453509 145317.03 AUTOMOBILE +100019 Customer#000100019 496452 306464.08 AUTOMOBILE +100019 Customer#000100019 714722 166631.49 AUTOMOBILE +100019 Customer#000100019 1260100 169448.11 AUTOMOBILE +100019 Customer#000100019 1955559 136377.5 AUTOMOBILE +100019 Customer#000100019 2886916 276149.86 AUTOMOBILE +100019 Customer#000100019 2930178 222869.13 AUTOMOBILE +100019 Customer#000100019 3595715 164198.79 AUTOMOBILE +100019 Customer#000100019 3743716 100522.98 AUTOMOBILE +100019 Customer#000100019 4055750 215015.14 AUTOMOBILE +100019 Customer#000100019 4598209 31343.96 AUTOMOBILE +100019 Customer#000100019 4879586 146435.83 AUTOMOBILE +100019 Customer#000100019 5335846 201826.39 AUTOMOBILE +100027 Customer#000100027 189538 300881.61 AUTOMOBILE +100027 Customer#000100027 334787 75880.7 AUTOMOBILE +100027 Customer#000100027 1716452 49245.0 AUTOMOBILE +100027 Customer#000100027 2173633 131377.72 AUTOMOBILE +100027 Customer#000100027 2263654 245376.32 AUTOMOBILE +100027 Customer#000100027 2911140 179407.59 AUTOMOBILE +100027 Customer#000100027 2951812 96225.94 AUTOMOBILE +100027 Customer#000100027 3472516 242704.42 AUTOMOBILE +100027 Customer#000100027 3557441 248766.72 AUTOMOBILE +100027 Customer#000100027 3571142 69712.35 AUTOMOBILE +100027 Customer#000100027 4356678 117105.44 AUTOMOBILE +100027 Customer#000100027 4387879 98019.22 AUTOMOBILE +100027 Customer#000100027 4473863 112257.21 AUTOMOBILE +100027 Customer#000100027 4986919 43428.59 AUTOMOBILE +100027 Customer#000100027 5144742 184889.44 AUTOMOBILE +100027 Customer#000100027 5402918 317801.29 AUTOMOBILE +100027 Customer#000100027 5462372 112119.69 AUTOMOBILE +100028 Customer#000100028 108064 263053.8 AUTOMOBILE +100028 Customer#000100028 2241284 22429.1 AUTOMOBILE +100028 Customer#000100028 3689188 86995.68 AUTOMOBILE +100028 Customer#000100028 3821029 202461.74 AUTOMOBILE +100028 Customer#000100028 5430053 30704.88 AUTOMOBILE +10003 Customer#000010003 397760 328553.49 AUTOMOBILE +10003 Customer#000010003 592196 258629.93 AUTOMOBILE +10003 Customer#000010003 721924 149696.32 AUTOMOBILE +10003 Customer#000010003 1067205 140203.36 AUTOMOBILE +10003 Customer#000010003 1518242 75779.19 AUTOMOBILE +10003 Customer#000010003 1622276 79117.45 AUTOMOBILE +10003 Customer#000010003 1683110 110544.09 AUTOMOBILE +10003 Customer#000010003 1860708 102134.73 AUTOMOBILE +10003 Customer#000010003 2375207 206056.83 AUTOMOBILE +10003 Customer#000010003 3000645 237774.83 AUTOMOBILE +10003 Customer#000010003 3009191 24912.01 AUTOMOBILE +10003 Customer#000010003 3355648 317479.39 AUTOMOBILE +10003 Customer#000010003 3436932 118569.44 AUTOMOBILE +10003 Customer#000010003 3640578 6416.07 AUTOMOBILE +10003 Customer#000010003 4688453 368393.79 AUTOMOBILE diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.q b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.q new file mode 100644 index 000000000..72793478e --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.q @@ -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.c_mktsegment from (select c_custkey, c_name, c_mktsegment, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' order by f.c_custkey,o_orderkey,o_totalprice,f.c_mktsegment limit 50; diff --git a/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.sql b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.sql new file mode 100644 index 000000000..72793478e --- /dev/null +++ b/framework/resources/Functional/lateralUnnest/sf1/lateral_unnest_filter_like_outside_flatten.sql @@ -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.c_mktsegment from (select c_custkey, c_name, c_mktsegment, flatten(c_orders) as o from customer) f WHERE f.c_mktsegment like '%AUTOMOBILE%' order by f.c_custkey,o_orderkey,o_totalprice,f.c_mktsegment limit 50; diff --git a/zookeeper.log b/zookeeper.log new file mode 100644 index 000000000..8f87850d5 --- /dev/null +++ b/zookeeper.log @@ -0,0 +1 @@ +Starting zookeeper ... already running as process 1873.