v.23.10Improvement

Updated Result Column Naming for Untuple Function with Aliases in ClickHouse

When function untuple is now called on a tuple with named elements and itself has an alias (e.g. select untuple(tuple(1)::Tuple(element_alias Int)) AS untuple_alias), then the result column name is now generated from the untuple alias and the tuple element alias (in the example: "untuple_alias.element_alias"). #55123 (garcher22).
Enhanced untuple function to generate result column names by combining the alias of the untuple call and the tuple element alias when used on tuples with named elements.

Why it matters

This feature improves clarity and usability by producing more descriptive and meaningful column names when untuple is applied to tuples with named elements and the untuple operation itself is aliased. It helps users identify the origin of each output column more easily in query results.

How to use it

When calling untuple on a tuple with named elements, simply assign an alias to the untuple call, for example:

SELECT untuple(tuple(1)::Tuple(element_alias Int)) AS untuple_alias


The output column names will be automatically generated in the format untuple_alias.element_alias.