2024-01-08 11:55:47 +00:00
|
|
|
DROP TABLE IF EXISTS t;
|
|
|
|
DROP TABLE IF EXISTS r;
|
|
|
|
SET allow_suspicious_low_cardinality_types = 1;
|
|
|
|
|
|
|
|
CREATE TABLE t (`x` UInt32, `s` LowCardinality(String)) ENGINE = Memory;
|
|
|
|
INSERT INTO t SELECT number, toString(number) FROM numbers(5);
|
|
|
|
|
|
|
|
CREATE TABLE r (`x` LowCardinality(Nullable(UInt32)), `s` Nullable(String)) ENGINE = Memory;
|
|
|
|
INSERT INTO r SELECT number, toString(number) FROM numbers(2, 8);
|
|
|
|
INSERT INTO r VALUES (NULL, NULL);
|
|
|
|
|
2024-07-12 12:49:26 +00:00
|
|
|
SET enable_analyzer = 0;
|
2024-01-09 11:58:50 +00:00
|
|
|
|
2024-02-21 18:05:20 +00:00
|
|
|
SELECT x FROM t FULL JOIN r USING (x) ORDER BY ALL
|
2024-01-08 11:55:47 +00:00
|
|
|
;
|
|
|
|
|
2024-01-09 11:58:50 +00:00
|
|
|
|
2024-02-21 18:05:20 +00:00
|
|
|
SELECT x FROM t FULL JOIN r USING (x) ORDER BY ALL
|
2024-01-09 11:58:50 +00:00
|
|
|
SETTINGS join_algorithm = 'partial_merge';
|
|
|
|
|
2024-02-21 18:05:20 +00:00
|
|
|
SELECT x FROM t FULL JOIN r USING (x) ORDER BY ALL
|
2024-01-08 11:55:47 +00:00
|
|
|
SETTINGS join_algorithm = 'full_sorting_merge';
|
|
|
|
|
2024-11-26 12:59:38 +00:00
|
|
|
SELECT '--- analyzer ---';
|
|
|
|
|
2024-07-12 12:49:26 +00:00
|
|
|
SET enable_analyzer = 1;
|
2024-01-09 11:58:50 +00:00
|
|
|
|
2024-02-21 18:05:20 +00:00
|
|
|
SELECT x FROM t FULL JOIN r USING (x) ORDER BY ALL
|
2024-01-09 11:58:50 +00:00
|
|
|
;
|
|
|
|
|
2024-02-21 18:05:20 +00:00
|
|
|
SELECT x FROM t FULL JOIN r USING (x) ORDER BY ALL
|
2024-01-08 11:55:47 +00:00
|
|
|
SETTINGS join_algorithm = 'partial_merge';
|
2024-01-09 11:58:50 +00:00
|
|
|
|
2024-02-21 18:05:20 +00:00
|
|
|
SELECT x FROM t FULL JOIN r USING (x) ORDER BY ALL
|
2024-01-09 11:58:50 +00:00
|
|
|
SETTINGS join_algorithm = 'full_sorting_merge';
|