[ 
https://issues.apache.org/jira/browse/CALCITE-5744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jackylau updated CALCITE-5744:
------------------------------
    Description: 
 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:*

{{}}
{code:java}
> SELECT str_to_map('a:1,b:2,c:3', ',', ':');

- {"a":"1","b":"2","c":"3"}

> SELECT str_to_map('a');
 {"a":null} {code}
{{{}{}}}{{{}{}}}

> Add STR_TO_MAP for Spark dialect
> --------------------------------
>
>                 Key: CALCITE-5744
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5744
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.35.0
>            Reporter: jackylau
>            Priority: Major
>             Fix For: 1.35.0
>
>
>  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:*
> {{}}
> {code:java}
> > SELECT str_to_map('a:1,b:2,c:3', ',', ':');
> - {"a":"1","b":"2","c":"3"}
> > SELECT str_to_map('a');
>  {"a":null} {code}
> {{{}{}}}{{{}{}}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to