v.20.11New Feature
Added untuple function to expand named tuples in SELECT list
Added function untuple which is a special function which can introduce new columns to the SELECT list by expanding a named tuple. #16242 (Nikolai Kochetov, Amos Bird).Why it matters
Theuntuple function simplifies the process of extracting and expanding tuple elements into separate columns. This enhances query readability and convenience when working with tuple data types, eliminating the need for manual extraction of each element.How to use it
Use theuntuple function within the SELECT statement to expand a named tuple as multiple columns. For example:SELECT untuple(tuple_column) FROM table_nameThis will add the individual fields of the tuple as separate columns in the query result.