ClickHouse/tests/queries/0_stateless/02890_untuple_column_names.reference
2023-11-11 12:49:33 +03:00

67 lines
1.3 KiB
Plaintext

-- tuple element alias
Row 1:
──────
tupleElement(CAST(tuple(1), 'Tuple(a Int)'), 1): 1
tupleElement(CAST(tuple('s'), 'Tuple(a String)'), 1): s
Row 1:
──────
tupleElement(CAST((1), 'Tuple(a Int)'), 'a'): 1
tupleElement(CAST(('s'), 'Tuple(a String)'), 'a'): s
Row 1:
──────
tupleElement(CAST((1), 'Tuple(a Int)'), 'a'): 1
tupleElement(CAST((1), 'Tuple(a Int)'), 'a'): 1
-- tuple element alias + untuple() alias
Row 1:
──────
x.a: 1
y.a: s
Row 1:
──────
x.a: 1
y.a: s
Row 1:
──────
x.a: 1
x.a: 1
-- untuple() alias
Row 1:
──────
x.1: 1
y.1: s
Row 1:
──────
x.1: 1
y.1: s
Row 1:
──────
x.1: 1
x.1: 1
-- no aliases
Row 1:
──────
tupleElement(CAST(tuple(1), 'Tuple(Int)'), 1): 1
tupleElement(CAST(tuple('s'), 'Tuple(String)'), 1): s
Row 1:
──────
tupleElement(CAST((1), 'Tuple(Int)'), '1'): 1
tupleElement(CAST(('s'), 'Tuple(String)'), '1'): s
Row 1:
──────
tupleElement(CAST((1), 'Tuple(Int)'), '1'): 1
tupleElement(CAST((1), 'Tuple(Int)'), '1'): 1
-- tuple() loses the column names (would be good to fix, see #36773)
Row 1:
──────
t.1: 1
Row 1:
──────
t.1: 1
-- thankfully JSONExtract() keeps them
Row 1:
──────
x.key: value
Row 1:
──────
x.key: value