diff --git a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/join.sql b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/join.sql index 08f54fe0a40e5..1cfc463acc588 100644 --- a/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/join.sql +++ b/sql/core/src/test/resources/sql-tests/inputs/postgreSQL/join.sql @@ -577,15 +577,15 @@ select count(*) from tenk1 a, tenk1 b -- regression test for 8.2 bug with improper re-ordering of left joins -- -DROP TABLE IF EXISTS tt3; -CREATE TABLE tt3(f1 int, f2 string) USING parquet; -INSERT INTO tt3 SELECT x.id, repeat('xyzzy', 100) FROM range(1,10001) x; +create or replace temporary view tt3 as select * from + (SELECT cast(x.id as int), repeat('xyzzy', 100) FROM range(1,10001) x) + as v(f1, f2); -- create index tt3i on tt3(f1); -- analyze tt3; -DROP TABLE IF EXISTS tt4; -CREATE TABLE tt4(f1 int) USING parquet; -INSERT INTO tt4 VALUES (0),(1),(9999); +create or replace temporary view tt4 as select * from + (values (0), (1), (9999)) + as v(f1); -- analyze tt4; SELECT a.f1 diff --git a/sql/core/src/test/resources/sql-tests/results/postgreSQL/join.sql.out b/sql/core/src/test/resources/sql-tests/results/postgreSQL/join.sql.out index f75fe0519645b..f823d4e1459d4 100644 --- a/sql/core/src/test/resources/sql-tests/results/postgreSQL/join.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/postgreSQL/join.sql.out @@ -1,5 +1,5 @@ -- Automatically generated by SQLQueryTestSuite --- Number of queries: 185 +-- Number of queries: 181 -- !query 0 @@ -2536,7 +2536,9 @@ struct -- !query 107 -DROP TABLE IF EXISTS tt3 +create or replace temporary view tt3 as select * from + (SELECT cast(x.id as int), repeat('xyzzy', 100) FROM range(1,10001) x) + as v(f1, f2) -- !query 107 schema struct<> -- !query 107 output @@ -2544,7 +2546,9 @@ struct<> -- !query 108 -CREATE TABLE tt3(f1 int, f2 string) USING parquet +create or replace temporary view tt4 as select * from + (values (0), (1), (9999)) + as v(f1) -- !query 108 schema struct<> -- !query 108 output @@ -2552,38 +2556,6 @@ struct<> -- !query 109 -INSERT INTO tt3 SELECT x.id, repeat('xyzzy', 100) FROM range(1,10001) x --- !query 109 schema -struct<> --- !query 109 output - - - --- !query 110 -DROP TABLE IF EXISTS tt4 --- !query 110 schema -struct<> --- !query 110 output - - - --- !query 111 -CREATE TABLE tt4(f1 int) USING parquet --- !query 111 schema -struct<> --- !query 111 output - - - --- !query 112 -INSERT INTO tt4 VALUES (0),(1),(9999) --- !query 112 schema -struct<> --- !query 112 output - - - --- !query 113 SELECT a.f1 FROM tt4 a LEFT JOIN ( @@ -2592,242 +2564,242 @@ LEFT JOIN ( WHERE c.f1 IS NULL ) AS d ON (a.f1 = d.f1) WHERE d.f1 IS NULL --- !query 113 schema +-- !query 109 schema struct --- !query 113 output +-- !query 109 output 0 1 9999 --- !query 114 +-- !query 110 create or replace temporary view tt5 as select * from (values (1, 10), (1, 11)) as v(f1, f2) --- !query 114 schema +-- !query 110 schema struct<> --- !query 114 output +-- !query 110 output --- !query 115 +-- !query 111 create or replace temporary view tt6 as select * from (values (1, 9), (1, 2), (2, 9)) as v(f1, f2) --- !query 115 schema +-- !query 111 schema struct<> --- !query 115 output +-- !query 111 output --- !query 116 +-- !query 112 select * from tt5,tt6 where tt5.f1 = tt6.f1 and tt5.f1 = tt5.f2 - tt6.f2 --- !query 116 schema +-- !query 112 schema struct --- !query 116 output +-- !query 112 output 1 10 1 9 --- !query 117 +-- !query 113 create or replace temporary view xx as select * from (values (1), (2), (3)) as v(pkxx) --- !query 117 schema +-- !query 113 schema struct<> --- !query 117 output +-- !query 113 output --- !query 118 +-- !query 114 create or replace temporary view yy as select * from (values (101, 1), (201, 2), (301, NULL)) as v(pkyy, pkxx) --- !query 118 schema +-- !query 114 schema struct<> --- !query 118 output +-- !query 114 output --- !query 119 +-- !query 115 select yy.pkyy as yy_pkyy, yy.pkxx as yy_pkxx, yya.pkyy as yya_pkyy, xxa.pkxx as xxa_pkxx, xxb.pkxx as xxb_pkxx from yy left join (SELECT * FROM yy where pkyy = 101) as yya ON yy.pkyy = yya.pkyy left join xx xxa on yya.pkxx = xxa.pkxx left join xx xxb on coalesce (xxa.pkxx, 1) = xxb.pkxx --- !query 119 schema +-- !query 115 schema struct --- !query 119 output +-- !query 115 output 101 1 101 1 1 201 2 NULL NULL 1 301 NULL NULL NULL 1 --- !query 120 +-- !query 116 create or replace temporary view zt1 as select * from (values (53)) as v(f1) --- !query 120 schema +-- !query 116 schema struct<> --- !query 120 output +-- !query 116 output --- !query 121 +-- !query 117 create or replace temporary view zt2 as select * from (values (53)) as v(f2) --- !query 121 schema +-- !query 117 schema struct<> --- !query 121 output +-- !query 117 output --- !query 122 +-- !query 118 create or replace temporary view zt3(f3 int) using parquet --- !query 122 schema +-- !query 118 schema struct<> --- !query 122 output +-- !query 118 output --- !query 123 +-- !query 119 select * from zt2 left join zt3 on (f2 = f3) left join zt1 on (f3 = f1) where f2 = 53 --- !query 123 schema +-- !query 119 schema struct --- !query 123 output +-- !query 119 output 53 NULL NULL --- !query 124 +-- !query 120 create temp view zv1 as select *,'dummy' AS junk from zt1 --- !query 124 schema +-- !query 120 schema struct<> --- !query 124 output +-- !query 120 output --- !query 125 +-- !query 121 select * from zt2 left join zt3 on (f2 = f3) left join zv1 on (f3 = f1) where f2 = 53 --- !query 125 schema +-- !query 121 schema struct --- !query 125 output +-- !query 121 output 53 NULL NULL NULL --- !query 126 +-- !query 122 select a.unique2, a.ten, b.tenthous, b.unique2, b.hundred from tenk1 a left join tenk1 b on a.unique2 = b.tenthous where a.unique1 = 42 and ((b.unique2 is null and a.ten = 2) or b.hundred = 3) --- !query 126 schema +-- !query 122 schema struct --- !query 126 output +-- !query 122 output --- !query 127 +-- !query 123 create or replace temporary view a (i integer) using parquet --- !query 127 schema +-- !query 123 schema struct<> --- !query 127 output +-- !query 123 output --- !query 128 +-- !query 124 create or replace temporary view b (x integer, y integer) using parquet --- !query 128 schema +-- !query 124 schema struct<> --- !query 128 output +-- !query 124 output --- !query 129 +-- !query 125 select * from a left join b on i = x and i = y and x = i --- !query 129 schema +-- !query 125 schema struct --- !query 129 output +-- !query 125 output --- !query 130 +-- !query 126 select t1.q2, count(t2.*) from int8_tbl t1 left join int8_tbl t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1 --- !query 130 schema +-- !query 126 schema struct --- !query 130 output +-- !query 126 output -4567890123456789 0 123 2 456 0 4567890123456789 6 --- !query 131 +-- !query 127 select t1.q2, count(t2.*) from int8_tbl t1 left join (select * from int8_tbl) t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1 --- !query 131 schema +-- !query 127 schema struct --- !query 131 output +-- !query 127 output -4567890123456789 0 123 2 456 0 4567890123456789 6 --- !query 132 +-- !query 128 select t1.q2, count(t2.*) from int8_tbl t1 left join (select q1, case when q2=1 then 1 else q2 end as q2 from int8_tbl) t2 on (t1.q2 = t2.q1) group by t1.q2 order by 1 --- !query 132 schema +-- !query 128 schema struct --- !query 132 output +-- !query 128 output -4567890123456789 0 123 2 456 0 4567890123456789 6 --- !query 133 +-- !query 129 create or replace temporary view a as select * from (values ('p'), ('q')) as v(code) --- !query 133 schema +-- !query 129 schema struct<> --- !query 133 output +-- !query 129 output --- !query 134 +-- !query 130 create or replace temporary view b as select * from (values ('p', 1), ('p', 2)) as v(a, num) --- !query 134 schema +-- !query 130 schema struct<> --- !query 134 output +-- !query 130 output --- !query 135 +-- !query 131 create or replace temporary view c as select * from (values ('A', 'p'), ('B', 'q'), ('C', null)) as v(name, a) --- !query 135 schema +-- !query 131 schema struct<> --- !query 135 output +-- !query 131 output --- !query 136 +-- !query 132 select c.name, ss.code, ss.b_cnt, ss.const from c left join (select a.code, coalesce(b_grp.cnt, 0) as b_cnt, -1 as const @@ -2837,15 +2809,15 @@ from c left join ) as ss on (c.a = ss.code) order by c.name --- !query 136 schema +-- !query 132 schema struct --- !query 136 output +-- !query 132 output A p 2 -1 B q 0 -1 C NULL NULL NULL --- !query 137 +-- !query 133 SELECT * FROM ( SELECT 1 as key1 ) sub1 LEFT JOIN @@ -2861,13 +2833,13 @@ LEFT JOIN ON sub4.key5 = sub3.key3 ) sub2 ON sub1.key1 = sub2.key3 --- !query 137 schema +-- !query 133 schema struct --- !query 137 output +-- !query 133 output 1 1 1 1 --- !query 138 +-- !query 134 SELECT * FROM ( SELECT 1 as key1 ) sub1 LEFT JOIN @@ -2883,13 +2855,13 @@ LEFT JOIN ON sub4.key5 = sub3.key3 ) sub2 ON sub1.key1 = sub2.key3 --- !query 138 schema +-- !query 134 schema struct --- !query 138 output +-- !query 134 output 1 1 1 1 --- !query 139 +-- !query 135 SELECT qq, unique1 FROM ( SELECT COALESCE(q1, 0) AS qq FROM int8_tbl a ) AS ss1 @@ -2897,45 +2869,45 @@ SELECT qq, unique1 ( SELECT COALESCE(q2, -1) AS qq FROM int8_tbl b ) AS ss2 USING (qq) INNER JOIN tenk1 c ON qq = unique2 --- !query 139 schema +-- !query 135 schema struct --- !query 139 output +-- !query 135 output 123 4596 123 4596 456 7318 --- !query 140 +-- !query 136 create or replace temporary view nt1 as select * from (values(1,true,true), (2,true,false), (3,false,false)) as v(id, a1, a2) --- !query 140 schema +-- !query 136 schema struct<> --- !query 140 output +-- !query 136 output --- !query 141 +-- !query 137 create or replace temporary view nt2 as select * from (values(1,1,true,true), (2,2,true,false), (3,3,false,false)) as v(id, nt1_id, b1, b2) --- !query 141 schema +-- !query 137 schema struct<> --- !query 141 output +-- !query 137 output --- !query 142 +-- !query 138 create or replace temporary view nt3 as select * from (values(1,1,true), (2,2,false), (3,3,true)) as v(id, nt2_id, c1) --- !query 142 schema +-- !query 138 schema struct<> --- !query 142 output +-- !query 138 output --- !query 143 +-- !query 139 select nt3.id from nt3 as nt3 left join @@ -2947,17 +2919,17 @@ from nt3 as nt3 ) as ss2 on ss2.id = nt3.nt2_id where nt3.id = 1 and ss2.b3 --- !query 143 schema +-- !query 139 schema struct --- !query 143 output +-- !query 139 output 1 --- !query 144 +-- !query 140 select * from int4_tbl a full join int4_tbl b on true --- !query 144 schema +-- !query 140 schema struct --- !query 144 output +-- !query 140 output -123456 -123456 -123456 -2147483647 -123456 0 @@ -2985,11 +2957,11 @@ struct 2147483647 2147483647 --- !query 145 +-- !query 141 select * from int4_tbl a full join int4_tbl b on false --- !query 145 schema +-- !query 141 schema struct --- !query 145 output +-- !query 141 output -123456 NULL -2147483647 NULL 0 NULL @@ -3002,27 +2974,27 @@ NULL 123456 NULL 2147483647 --- !query 146 +-- !query 142 select count(*) from tenk1 a join tenk1 b on a.unique1 = b.unique2 left join tenk1 c on a.unique2 = b.unique1 and c.thousand = a.thousand join int4_tbl on b.thousand = f1 --- !query 146 schema +-- !query 142 schema struct --- !query 146 output +-- !query 142 output 10 --- !query 147 +-- !query 143 select b.unique1 from tenk1 a join tenk1 b on a.unique1 = b.unique2 left join tenk1 c on b.unique1 = 42 and c.thousand = a.thousand join int4_tbl i1 on b.thousand = f1 right join int4_tbl i2 on i2.f1 = b.tenthous order by 1 --- !query 147 schema +-- !query 143 schema struct --- !query 147 output +-- !query 143 output NULL NULL NULL @@ -3030,7 +3002,7 @@ NULL 0 --- !query 148 +-- !query 144 select * from ( select unique1, q1, coalesce(unique1, -1) + q1 as fault @@ -3038,43 +3010,43 @@ select * from ) ss where fault = 122 order by fault --- !query 148 schema +-- !query 144 schema struct --- !query 148 output +-- !query 144 output NULL 123 122 --- !query 149 +-- !query 145 select q1, unique2, thousand, hundred from int8_tbl a left join tenk1 b on q1 = unique2 where coalesce(thousand,123) = q1 and q1 = coalesce(hundred,123) --- !query 149 schema +-- !query 145 schema struct --- !query 149 output +-- !query 145 output --- !query 150 +-- !query 146 select f1, unique2, case when unique2 is null then f1 else 0 end from int4_tbl a left join tenk1 b on f1 = unique2 where (case when unique2 is null then f1 else 0 end) = 0 --- !query 150 schema +-- !query 146 schema struct --- !query 150 output +-- !query 146 output 0 0 0 --- !query 151 +-- !query 147 select a.unique1, b.unique1, c.unique1, coalesce(b.twothousand, a.twothousand) from tenk1 a left join tenk1 b on b.thousand = a.unique1 left join tenk1 c on c.unique2 = coalesce(b.twothousand, a.twothousand) where a.unique2 < 10 and coalesce(b.twothousand, a.twothousand) = 44 --- !query 151 schema +-- !query 147 schema struct --- !query 151 output +-- !query 147 output --- !query 152 +-- !query 148 select * from text_tbl t1 inner join int8_tbl i8 @@ -3083,32 +3055,32 @@ select * from on t1.f1 = 'doh!' left join int4_tbl i4 on i8.q1 = i4.f1 --- !query 152 schema +-- !query 148 schema struct --- !query 152 output +-- !query 148 output doh! 123 456 doh! NULL doh! 123 456 hi de ho neighbor NULL --- !query 153 +-- !query 149 select * from (select 1 as id) as xx left join (tenk1 as a1 full join (select 1 as id) as yy on (a1.unique1 = yy.id)) on (xx.id = coalesce(yy.id)) --- !query 153 schema +-- !query 149 schema struct --- !query 153 output +-- !query 149 output 1 1 2838 1 1 1 1 1 1 1 1 1 2 3 BAAAAA EFEAAA OOOOxx 1 --- !query 154 +-- !query 150 select a.q2, b.q1 from int8_tbl a left join int8_tbl b on a.q2 = coalesce(b.q1, 1) where coalesce(b.q1, 1) > 0 --- !query 154 schema +-- !query 150 schema struct --- !query 154 output +-- !query 150 output -4567890123456789 NULL 123 123 123 123 @@ -3121,124 +3093,124 @@ struct 4567890123456789 4567890123456789 --- !query 155 +-- !query 151 create or replace temporary view parent as select * from (values (1, 10), (2, 20), (3, 30)) as v(k, pd) --- !query 155 schema +-- !query 151 schema struct<> --- !query 155 output +-- !query 151 output --- !query 156 +-- !query 152 create or replace temporary view child as select * from (values (1, 100), (4, 400)) as v(k, cd) --- !query 156 schema +-- !query 152 schema struct<> --- !query 156 output +-- !query 152 output --- !query 157 +-- !query 153 select p.* from parent p left join child c on (p.k = c.k) --- !query 157 schema +-- !query 153 schema struct --- !query 157 output +-- !query 153 output 1 10 2 20 3 30 --- !query 158 +-- !query 154 select p.*, linked from parent p left join (select c.*, true as linked from child c) as ss on (p.k = ss.k) --- !query 158 schema +-- !query 154 schema struct --- !query 158 output +-- !query 154 output 1 10 true 2 20 NULL 3 30 NULL --- !query 159 +-- !query 155 select p.* from parent p left join child c on (p.k = c.k) where p.k = 1 and p.k = 2 --- !query 159 schema +-- !query 155 schema struct --- !query 159 output +-- !query 155 output --- !query 160 +-- !query 156 select p.* from (parent p left join child c on (p.k = c.k)) join parent x on p.k = x.k where p.k = 1 and p.k = 2 --- !query 160 schema +-- !query 156 schema struct --- !query 160 output +-- !query 156 output --- !query 161 +-- !query 157 create or replace temporary view a as select * from (values (0), (1)) as v(id) --- !query 161 schema +-- !query 157 schema struct<> --- !query 161 output +-- !query 157 output --- !query 162 +-- !query 158 create or replace temporary view b as select * from (values (0, 0), (1, NULL)) as v(id, a_id) --- !query 162 schema +-- !query 158 schema struct<> --- !query 162 output +-- !query 158 output --- !query 163 +-- !query 159 SELECT * FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0) --- !query 163 schema +-- !query 159 schema struct --- !query 163 output +-- !query 159 output 1 NULL NULL --- !query 164 +-- !query 160 SELECT b.* FROM b LEFT JOIN a ON (b.a_id = a.id) WHERE (a.id IS NULL OR a.id > 0) --- !query 164 schema +-- !query 160 schema struct --- !query 164 output +-- !query 160 output 1 NULL --- !query 165 +-- !query 161 create or replace temporary view innertab as select * from (values (123L, 42L)) as v(id, dat1) --- !query 165 schema +-- !query 161 schema struct<> --- !query 165 output +-- !query 161 output --- !query 166 +-- !query 162 SELECT * FROM (SELECT 1 AS x) ss1 LEFT JOIN (SELECT q1, q2, COALESCE(dat1, q1) AS y FROM int8_tbl LEFT JOIN innertab ON q2 = id) ss2 ON true --- !query 166 schema +-- !query 162 schema struct --- !query 166 output +-- !query 162 output 1 123 456 123 1 123 4567890123456789 123 1 4567890123456789 -4567890123456789 4567890123456789 @@ -3246,163 +3218,163 @@ struct 1 4567890123456789 4567890123456789 4567890123456789 --- !query 167 +-- !query 163 select * from int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = f1 --- !query 167 schema +-- !query 163 schema struct<> --- !query 167 output +-- !query 163 output org.apache.spark.sql.AnalysisException Reference 'f1' is ambiguous, could be: j.f1, j.f1.; line 2 pos 63 --- !query 168 +-- !query 164 select * from int8_tbl x join (int4_tbl x cross join int4_tbl y) j on q1 = y.f1 --- !query 168 schema +-- !query 164 schema struct<> --- !query 168 output +-- !query 164 output org.apache.spark.sql.AnalysisException cannot resolve '`y.f1`' given input columns: [j.f1, j.f1, x.q1, x.q2]; line 2 pos 63 --- !query 169 +-- !query 165 select * from int8_tbl x join (int4_tbl x cross join int4_tbl y(ff)) j on q1 = f1 --- !query 169 schema +-- !query 165 schema struct --- !query 169 output +-- !query 165 output --- !query 170 +-- !query 166 select t1.uunique1 from tenk1 t1 join tenk2 t2 on t1.two = t2.two --- !query 170 schema +-- !query 166 schema struct<> --- !query 170 output +-- !query 166 output org.apache.spark.sql.AnalysisException cannot resolve '`t1.uunique1`' given input columns: [t1.even, t2.even, t1.fivethous, t2.fivethous, t1.four, t2.four, t1.hundred, t2.hundred, t1.odd, t2.odd, t1.string4, t2.string4, t1.stringu1, t2.stringu1, t1.stringu2, t2.stringu2, t1.ten, t2.ten, t1.tenthous, t2.tenthous, t1.thousand, t2.thousand, t1.twenty, t2.twenty, t1.two, t2.two, t1.twothousand, t2.twothousand, t1.unique1, t2.unique1, t1.unique2, t2.unique2]; line 1 pos 7 --- !query 171 +-- !query 167 select t2.uunique1 from tenk1 t1 join tenk2 t2 on t1.two = t2.two --- !query 171 schema +-- !query 167 schema struct<> --- !query 171 output +-- !query 167 output org.apache.spark.sql.AnalysisException cannot resolve '`t2.uunique1`' given input columns: [t1.even, t2.even, t1.fivethous, t2.fivethous, t1.four, t2.four, t1.hundred, t2.hundred, t1.odd, t2.odd, t1.string4, t2.string4, t1.stringu1, t2.stringu1, t1.stringu2, t2.stringu2, t1.ten, t2.ten, t1.tenthous, t2.tenthous, t1.thousand, t2.thousand, t1.twenty, t2.twenty, t1.two, t2.two, t1.twothousand, t2.twothousand, t1.unique1, t2.unique1, t1.unique2, t2.unique2]; line 1 pos 7 --- !query 172 +-- !query 168 select uunique1 from tenk1 t1 join tenk2 t2 on t1.two = t2.two --- !query 172 schema +-- !query 168 schema struct<> --- !query 172 output +-- !query 168 output org.apache.spark.sql.AnalysisException cannot resolve '`uunique1`' given input columns: [t1.even, t2.even, t1.fivethous, t2.fivethous, t1.four, t2.four, t1.hundred, t2.hundred, t1.odd, t2.odd, t1.string4, t2.string4, t1.stringu1, t2.stringu1, t1.stringu2, t2.stringu2, t1.ten, t2.ten, t1.tenthous, t2.tenthous, t1.thousand, t2.thousand, t1.twenty, t2.twenty, t1.two, t2.two, t1.twothousand, t2.twothousand, t1.unique1, t2.unique1, t1.unique2, t2.unique2]; line 1 pos 7 --- !query 173 +-- !query 169 select f1,g from int4_tbl a, (select f1 as g) ss --- !query 173 schema +-- !query 169 schema struct<> --- !query 173 output +-- !query 169 output org.apache.spark.sql.AnalysisException cannot resolve '`f1`' given input columns: []; line 1 pos 37 --- !query 174 +-- !query 170 select f1,g from int4_tbl a, (select a.f1 as g) ss --- !query 174 schema +-- !query 170 schema struct<> --- !query 174 output +-- !query 170 output org.apache.spark.sql.AnalysisException cannot resolve '`a.f1`' given input columns: []; line 1 pos 37 --- !query 175 +-- !query 171 select f1,g from int4_tbl a cross join (select f1 as g) ss --- !query 175 schema +-- !query 171 schema struct<> --- !query 175 output +-- !query 171 output org.apache.spark.sql.AnalysisException cannot resolve '`f1`' given input columns: []; line 1 pos 47 --- !query 176 +-- !query 172 select f1,g from int4_tbl a cross join (select a.f1 as g) ss --- !query 176 schema +-- !query 172 schema struct<> --- !query 176 output +-- !query 172 output org.apache.spark.sql.AnalysisException cannot resolve '`a.f1`' given input columns: []; line 1 pos 47 --- !query 177 +-- !query 173 CREATE TABLE j1 (id1 int, id2 int) USING parquet --- !query 177 schema +-- !query 173 schema struct<> --- !query 177 output +-- !query 173 output --- !query 178 +-- !query 174 CREATE TABLE j2 (id1 int, id2 int) USING parquet --- !query 178 schema +-- !query 174 schema struct<> --- !query 178 output +-- !query 174 output --- !query 179 +-- !query 175 INSERT INTO j1 values(1,1),(1,2) --- !query 179 schema +-- !query 175 schema struct<> --- !query 179 output +-- !query 175 output --- !query 180 +-- !query 176 INSERT INTO j2 values(1,1) --- !query 180 schema +-- !query 176 schema struct<> --- !query 180 output +-- !query 176 output --- !query 181 +-- !query 177 INSERT INTO j2 values(1,2) --- !query 181 schema +-- !query 177 schema struct<> --- !query 181 output +-- !query 177 output --- !query 182 +-- !query 178 select * from j1 inner join j2 on j1.id1 = j2.id1 and j1.id2 = j2.id2 where j1.id1 % 1000 = 1 and j2.id1 % 1000 = 1 --- !query 182 schema +-- !query 178 schema struct --- !query 182 output +-- !query 178 output 1 1 1 1 1 2 1 2 --- !query 183 +-- !query 179 drop table j1 --- !query 183 schema +-- !query 179 schema struct<> --- !query 183 output +-- !query 179 output --- !query 184 +-- !query 180 drop table j2 --- !query 184 schema +-- !query 180 schema struct<> --- !query 184 output +-- !query 180 output