v.21.9New Feature
Add tupleToNameValuePairs function for named tuples
Add tupleToNameValuePairs, a function that turns a named tuple into an array of pairs. #27505 (Braulio Valdivielso Martínez).Why it matters
This feature enables users to easily transform named tuples into arrays of pairs, facilitating operations that require key-value pair structures and improving data handling flexibility within queries.How to use it
Use thetupleToNameValuePairs function by passing a named tuple as an argument. The function returns an array of tuples where each element contains the name and corresponding value from the input tuple, for example:sql<br>SELECT tupleToNameValuePairs((a := 1, b := 'text'))<br>FROM table<br>