2019-08-08 14:20:25 +00:00
|
|
|
SET any_join_distinct_right_table_keys = 1;
|
2024-07-12 12:49:26 +00:00
|
|
|
SET enable_analyzer = 1;
|
2019-08-05 19:23:02 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE IF EXISTS t1_00848;
|
|
|
|
DROP TABLE IF EXISTS t2_00848;
|
|
|
|
DROP TABLE IF EXISTS t3_00848;
|
|
|
|
CREATE TABLE t1_00848 ( id String ) ENGINE = Memory;
|
|
|
|
CREATE TABLE t2_00848 ( id Nullable(String) ) ENGINE = Memory;
|
|
|
|
CREATE TABLE t3_00848 ( id Nullable(String), not_id Nullable(String) ) ENGINE = Memory;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
insert into t1_00848 values ('l');
|
|
|
|
insert into t3_00848 (id) values ('r');
|
2019-03-26 19:46:03 +00:00
|
|
|
|
|
|
|
SELECT 'on';
|
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY FULL JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 ANY FULL JOIN t3_00848 t3 ON t2.id = t3.id ORDER BY t2.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 FULL JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
2020-12-04 02:15:44 +00:00
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 FULL JOIN t3_00848 t3 ON t2.id = t3.id ORDER BY t2.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
|
|
|
SELECT 'using';
|
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY t2.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 FULL JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 FULL JOIN t3_00848 t3 USING(id) ORDER BY t2.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id;
|
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
|
|
|
SET join_use_nulls = 1;
|
|
|
|
|
|
|
|
SELECT 'on + join_use_nulls';
|
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY FULL JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 ANY FULL JOIN t3_00848 t3 ON t2.id = t3.id ORDER BY t2.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 FULL JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 FULL JOIN t3_00848 t3 ON t2.id = t3.id ORDER BY t2.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2020-02-28 12:37:15 +00:00
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 ON t1.id = t3.id ORDER BY t1.id, t3.id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
|
|
|
SELECT 'using + join_use_nulls';
|
|
|
|
|
2023-03-05 20:45:53 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2023-03-05 20:45:53 +00:00
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY id;
|
|
|
|
SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 FULL JOIN t3_00848 t3 USING(id) ORDER BY id;
|
|
|
|
SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 FULL JOIN t3_00848 t3 USING(id) ORDER BY id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2023-03-05 20:45:53 +00:00
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY id;
|
|
|
|
SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY id;
|
2019-03-26 19:46:03 +00:00
|
|
|
|
2019-06-03 17:36:27 +00:00
|
|
|
DROP TABLE t1_00848;
|
|
|
|
DROP TABLE t2_00848;
|
2019-06-07 16:02:24 +00:00
|
|
|
DROP TABLE t3_00848;
|