You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@inlong.apache.org by "emptyOVO (via GitHub)" <gi...@apache.org> on 2024/09/27 13:55:17 UTC

[I] [Feature][SDK] Transform support STR_TO_MAP() function [inlong]

emptyOVO opened a new issue, #11216:
URL: https://github.com/apache/inlong/issues/11216

   ### Description
   
   * parent issue: #10796 
   * from flinksql: https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/functions/systemfunctions/#string-functions
   * STR_TO_MAP(string1[, string2, string3])--Returns a map after splitting the string1 into key/value pairs using delimiters. string2 is the pair delimiter, default is ‘,’. And string3 is the key-value delimiter, default is ‘=’. Both pair delimiter and key-value delimiter are treated as regular expressions. So special characters (e.g. <([{\^-=$!|]})?*+.>) need to be properly escaped before using as a delimiter literally.
   
   ### Use case
   
   `STR_TO_MAP('item1:10,item2:5,item3:2', ':', ',')--{'item1' -> 10, 'item2' -> 5, 'item3' -> 2}`
   
   ### Are you willing to submit PR?
   
   - [X] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org