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).
Introduced the untuple function that expands a named tuple into multiple columns in the SELECT list.

Why it matters

The untuple 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 the untuple function within the SELECT statement to expand a named tuple as multiple columns. For example:

SELECT untuple(tuple_column) FROM table_name

This will add the individual fields of the tuple as separate columns in the query result.