Creates a struct based on a given value list.
Syntax
struct struct(<value1>,<value2>[, ...])
Parameters
value: required. A value of any data type.
Return value
A value of the STRUCT type is returned. Columns are sequentially named as col1, col2, ...
.
Examples
-- The return value is {col1:a, col2:123, col3:true, col4:56.9}.
select struct('a',123,'true',56.90);
Related functions
STRUCT is a complex type function. For more information about the functions that are used to process data of complex data types, such as ARRAY, MAP, STRUCT, and JSON, see Complex type functions.