ClickHouse/tests/queries/0_stateless/01881_union_header_mismatch_bug.sql
2022-08-01 17:56:27 +00:00

36 lines
710 B
SQL
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

select * from ( select 'table' as table, toInt64(10) as rows, toInt64(101) as elements union all select 'another table' as table, toInt64(0) as rows, toInt64(0) as elements ) where rows - elements <> 0;
SELECT
label,
number
FROM
(
SELECT
'a' AS label,
number
FROM
(
SELECT number
FROM numbers(10)
)
UNION ALL
SELECT
'b' AS label,
number
FROM
(
SELECT number
FROM numbers(10)
)
)
WHERE number IN
(
SELECT number
FROM numbers(5)
) order by label, number;
SELECT NULL FROM
(SELECT [1048575, NULL] AS ax, 2147483648 AS c) t1 ARRAY JOIN ax
INNER JOIN (SELECT NULL AS c) t2 USING (c);