You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2025/11/11 02:35:00 UTC

[jira] [Commented] (IMPALA-14467) get_json_object fails to parse JSON paths with dots in key names

    [ https://issues.apache.org/jira/browse/IMPALA-14467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18037331#comment-18037331 ] 

Quanlong Huang commented on IMPALA-14467:
-----------------------------------------

Thanks for filing this! It seems we should also add this in Hive.
{noformat}
0: jdbc:hive2://localhost:11050> SELECT GET_JSON_OBJECT ('{"a.com":1}', '$."a.com"');
NULL{noformat}

> get_json_object fails to parse JSON paths with dots in key names
> ----------------------------------------------------------------
>
>                 Key: IMPALA-14467
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14467
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: YifanZhang
>            Assignee: YifanZhang
>            Priority: Major
>
> This query returns null:
> {code:java}
> SELECT GET_JSON_OBJECT ('{"a.com":1}', '$.a.com'); {code}
> This query fails:
> {code:java}
> SELECT GET_JSON_OBJECT ('{"a.com":1}', '$."a.com"'); 
> failed: UDF ERROR: Failed to parse json path '$."a.com"': Expected key at position 2{code}
>  
> MySQL8.0 returns the correct result:
> {code:java}
> mysql> SELECT JSON_EXTRACT('{"a.com":1}', '$."a.com"');
> +------------------------------------------+
> | JSON_EXTRACT('{"a.com":1}', '$."a.com"') |
> +------------------------------------------+
> | 1                                        |
> +------------------------------------------+ {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org