ClickHouse/tests/queries/0_stateless/02815_empty_subquery_nullable_bug.sql
2023-09-28 09:13:01 +00:00

32 lines
619 B
SQL

SELECT * FROM (
SELECT (
SELECT 0 AS x
FROM (SELECT 1 AS x) t1
JOIN (SELECT 1 AS x) t2 USING (x)
) AS x
FROM ( SELECT 1 AS x )
) FORMAT Null;
SELECT (x IN (111)) == 1
FROM
(
SELECT ( SELECT 3 :: Nullable(UInt8) WHERE 0 ) AS x
FROM ( SELECT 2 AS x )
) FORMAT Null;
SELECT (x IN (111)) == 1
FROM
(
SELECT ( SELECT 3 :: Nullable(UInt8) WHERE 1 ) AS x
FROM ( SELECT 2 AS x )
) FORMAT Null;
SELECT (x IN (111)) == 1
FROM
(
SELECT ( SELECT 3 WHERE 0 ) AS x
FROM ( SELECT 2 AS x )
) FORMAT Null;
SELECT x, (SELECT 1 WHERE NULL) AS x FORMAT Null;