v.20.5Improvement

Allow large UInt types as index in tupleElement function

Allow large UInt types as the index in function tupleElement. #10874 (hcz).
Allow large UInt types as the index argument in the tupleElement function.

Why it matters

Previously, tupleElement only supported small integer types as the index to access elements of a tuple. This feature enables the use of larger unsigned integer types (UInt64) as the index, solving limitations when working with tuples and improving function flexibility.

How to use it

Simply use tupleElement with a larger unsigned integer type (e.g., UInt64) as the index without additional configuration. For example:

SELECT tupleElement(my_tuple, CAST(5 AS UInt64)) FROM table