Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Not A Bug
-
Impala 0.7
-
None
-
any
Description
The built-in function "str_to_map" is not supported yet.
To add this feature, MAP type should be added first.
The functional spec of str_to_map is like below.
- Return Type : map<string,string>
- Name(Signature) : str_to_map(text[, delimiter1, delimiter2])
- Description : Splits text into key-value pairs using two delimiters. Delimiter1 separates text into K-V pairs, and Delimiter2 splits each K-V pair. Default delimiters are ',' for delimiter1 and ':' for delimiter2.
The following operator provide mechanism to access elements in Map type.
- Operator : M[key]
- Operand types : M is a Map<K, V> and key has type K
- Description : Returns the value corresponding to the key in the map e.g. if M is a map comprising of
{'f' -> 'foo', 'b' -> 'bar', 'all' -> 'foobar'}
then M['all'] returns 'foobar'