ClickHouse/tests/queries/0_stateless/00132_sets.sql
Azat Khuzhin b51c180922 tests/00132_sets: remove one more tuple nesting
CI report [1]:

    2021-09-11 14:25:31 [5656ccb14ed9] 2021.09.11 14:25:31.498685 [ 18561 ] {6096a73f-2066-4c78-9f99-73f013c96deb} <Error> executeQuery: Code: 43. DB::Exception: Invalid types for IN function: Tuple(UInt8, Tuple(UInt8, UInt8)) and Tuple(Tuple(Tuple(UInt8, Tuple(UInt8, UInt8)), Tuple(UInt8, Tuple(UInt8, UInt8)))).: While processing (1 AS number, (2, 3) AS tuple) IN tuple(((1, (2, 3)), (4, (5, 6)))). (ILLEGAL_TYPE_OF_ARGUMENT) (version 21.11.1.1) (from [::1]:32780) (comment: 00132_sets.sql) (in query: SELECT number, tuple FROM (SELECT 1 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN (((1, (2, 3)), (4, (5, 6))));), Stack trace (when copying this message, always include the lines below):

  [1]: https://clickhouse-test-reports.s3.yandex.net/28888/5ad9cb9b797abe498ae558f9c233e16cd89e41b4/fast_test.html#fail1
2021-09-11 15:29:43 +03:00

15 lines
1.3 KiB
SQL

SELECT 1 IN (1, 2, 3);
SELECT toUInt16(1) IN (1, 1000, 3);
SELECT 'Hello' IN ('Hello', 'world');
SELECT (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17) IN ((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17));
SELECT (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, '') IN ((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ''));
SELECT (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, '') IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'a');
SELECT (number AS n, n + 1, n + 2, n + 3) IN (1, 2, 3, 4) FROM system.numbers LIMIT 3;
SELECT (number AS n, n + 1, n + 2, n + 3, n - 1) IN (1, 2, 3, 4, 0) FROM system.numbers LIMIT 3;
SELECT (number AS n, n + 1, toString(n + 2), n + 3, n - 1) IN (1, 2, '3', 4, 0) FROM system.numbers LIMIT 3;
SELECT number, tuple FROM (SELECT 1 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN ( (/*number*/1, /*tuple*/(2, 3)), (/*number*/4, /*tuple*/(5, 6)) );
SELECT number, tuple FROM (SELECT 2 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN ((2, (2, 3)));
SELECT number, tuple FROM (SELECT 3 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN (3, (2, 3));
SELECT number, tuple FROM (SELECT 4 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN (SELECT 4, (2, 3));
SELECT number, tuple FROM (SELECT 5 AS number, (2, 3) AS tuple) WHERE (number, tuple) IN (SELECT 5, (2, 3));