ClickHouse/tests/queries/0_stateless/02541_tuple_element_with_null.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
524 B
MySQL
Raw Normal View History

2023-02-02 08:48:13 +00:00
DROP TABLE IF EXISTS test_tuple_element;
CREATE TABLE test_tuple_element
(
tuple Tuple(k1 Nullable(UInt64), k2 UInt64)
)
ENGINE = MergeTree
ORDER BY tuple()
SETTINGS index_granularity = 8192;
INSERT INTO test_tuple_element VALUES (tuple(1,2)), (tuple(NULL, 3));
2024-06-18 12:35:33 +00:00
SELECT
2023-02-02 08:48:13 +00:00
tupleElement(tuple, 'k1', 0) fine_k1_with_0,
tupleElement(tuple, 'k1', NULL) k1_with_null,
tupleElement(tuple, 'k2', 0) k2_with_0,
tupleElement(tuple, 'k2', NULL) k2_with_null
FROM test_tuple_element;
DROP TABLE test_tuple_element;