Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.35.0
Description
MAP_FROM_ARRAYS (array1, array2)
- Returns a map created from an array1 and *array2. Note that the lengths of two arrays should be the same
// code placeholder > SELECT map_from_arrays(array(1.0, 3.0), array('2', '4')); {1.0:"2",3.0:"4"}
STR_TO_MAP(string[, stringDelimiter[, keyValueDelimiter]])
- Returns a map after splitting the string into key/value pairs using delimiters. Default delimiters are ',' for stringDelimiter and ':' for keyValueDelimiter Both pairDelim and keyValueDelim are treated as regular expressions.
Examples:
> SELECT str_to_map('a:1,b:2,c:3', ',', ':'); - {"a":"1","b":"2","c":"3"} > SELECT str_to_map('a'); {"a":null}
Attachments
Issue Links
- is a parent of
-
CALCITE-5739 Add MAP_FROM_ARRAYS for Spark dialect
- Closed
- links to