413331861 opened a new issue #449: json解析函数key中带有特殊关键字,比如(#  .   |)会出现无法解析的情况
URL: https://github.com/apache/incubator-doris/issues/449
 
 
   测试例子如下:
   
   MySQL [test]> select * from a;
   +------+-----------------------------------+
   | id   | data                              |
   +------+-----------------------------------+
   |    2 | {"text.abc":"MXCHIP won a prize"} |
   |    4 | {"text|abc":"MXCHIP won a prize"} |
   |    1 | {"text_abc":"MXCHIP won a prize"} |
   |    3 | {"text#abc":"MXCHIP won a prize"} |
   +------+-----------------------------------+
   4 rows in set (0.01 sec)
   
   
   MySQL [test]> select get_json_string(data,'$.text_abc') from a;
   +---------------------------------------+
   | get_json_string(`data`, '$.text_abc') |
   +---------------------------------------+
   | NULL                                  |
   | NULL                                  |
   | MXCHIP won a prize                    |
   | NULL                                  |
   +---------------------------------------+
   4 rows in set (0.01 sec)
   
   MySQL [test]> select get_json_string(data,'$.text.abc') from a;
   +---------------------------------------+
   | get_json_string(`data`, '$.text.abc') |
   +---------------------------------------+
   | NULL                                  |
   | NULL                                  |
   | NULL                                  |
   | NULL                                  |
   +---------------------------------------+
   4 rows in set (0.01 sec)
   
   MySQL [test]> select get_json_string(data,'$.text#abc') from a;
   +---------------------------------------+
   | get_json_string(`data`, '$.text#abc') |
   +---------------------------------------+
   | NULL                                  |
   | NULL                                  |
   | NULL                                  |
   | NULL                                  |
   +---------------------------------------+
   4 rows in set (0.01 sec)
   
   MySQL [test]> select get_json_string(data,'$.text|abc') from a;
   +---------------------------------------+
   | get_json_string(`data`, '$.text|abc') |
   +---------------------------------------+
   | NULL                                  |
   | NULL                                  |
   | NULL                                  |
   | NULL                                  |
   +---------------------------------------+
   4 rows in set (0.01 sec)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to