ClickHouse/tests/queries/0_stateless/02340_union_header.reference
Azat Khuzhin 563fac5333 tests: add a test for incorrect header in UNION queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:53:03 +03:00

8 lines
575 B
Plaintext

-- { echo }
SELECT a, b, c FROM (SELECT 3 AS a, 2147483647 AS b, 1048575 AS c UNION ALL SELECT -2, NULL, -2) AS js1 ORDER BY a;
-2 \N -2
3 2147483647 1048575
SELECT a, b, c, d FROM (SELECT 3 AS a, 2147483647 AS b, 1048575 AS c UNION ALL SELECT -2, NULL, -2) AS js1 ALL LEFT JOIN (SELECT 100 AS a, -9223372036854775808 AS b, NULL AS d UNION ALL SELECT 256, 256, NULL) AS js2 USING (a, b) ORDER BY a DESC NULLS FIRST, '-0.02' ASC, b ASC NULLS FIRST, c DESC NULLS FIRST, 1048575 ASC NULLS LAST, d DESC SETTINGS enable_positional_arguments=0;
3 2147483647 1048575 \N
-2 \N -2 \N