mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 14:02:21 +00:00
86 lines
1.2 KiB
Plaintext
86 lines
1.2 KiB
Plaintext
-- { echo }
|
|
-- Test: crash the server
|
|
SELECT 'fooooo' INTERSECT DISTINCT SELECT 'fooooo';
|
|
fooooo
|
|
SELECT 'fooooo' EXCEPT ALL SELECT 'fooooo';
|
|
-- Test: intersect return incorrect result for const column
|
|
SELECT 1 FROM numbers(10) INTERSECT SELECT 1 FROM numbers(10);
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
SELECT toString(1) FROM numbers(10) INTERSECT SELECT toString(1) FROM numbers(10);
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
SELECT '1' FROM numbers(10) INTERSECT SELECT '1' FROM numbers(10);
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
SELECT 1 FROM numbers(10) INTERSECT DISTINCT SELECT 1 FROM numbers(10);
|
|
1
|
|
SELECT toString(1) FROM numbers(10) INTERSECT DISTINCT SELECT toString(1) FROM numbers(10);
|
|
1
|
|
SELECT '1' FROM numbers(10) INTERSECT DISTINCT SELECT '1' FROM numbers(10);
|
|
1
|
|
-- Test: except return incorrect result for const column
|
|
SELECT 2 FROM numbers(10) EXCEPT SELECT 1 FROM numbers(5);
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
SELECT toString(2) FROM numbers(10) EXCEPT SELECT toString(1) FROM numbers(5);
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
SELECT '2' FROM numbers(10) EXCEPT SELECT '1' FROM numbers(5);
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
SELECT 2 FROM numbers(10) EXCEPT DISTINCT SELECT 1 FROM numbers(5);
|
|
2
|
|
SELECT toString(2) FROM numbers(10) EXCEPT DISTINCT SELECT toString(1) FROM numbers(5);
|
|
2
|
|
SELECT '2' FROM numbers(10) EXCEPT DISTINCT SELECT '1' FROM numbers(5);
|
|
2
|