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

ASF subversion and git services commented on IMPALA-8547:
---------------------------------------------------------

Commit adf2c464aed5d35c976c1439982e0a927f76b609 in impala's branch 
refs/heads/master from Eugene Zimichev
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=adf2c46 ]

IMPALA-8547: get_json_object fails to get value for numeric key

Allows numeric keys for JSON objects in get_json_object. This patch
makes Impala consistent with Hive and Postgres behavior for
get_json_object.

Queries such as "select get_json_object('{"1": 5}', '$.1');"
would fail before this patch. Now the query will return '5'.

Testing:
* Added tests to expr-test

Change-Id: I7df037ccf2c79da0ba86a46df1dd28ab0e9a45f4
Reviewed-on: http://gerrit.cloudera.org:8080/14905
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> get_json_object fails to get value for numeric key
> --------------------------------------------------
>
>                 Key: IMPALA-8547
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8547
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 3.1.0
>            Reporter: Eugene Zimichev
>            Assignee: Eugene Zimichev
>            Priority: Minor
>              Labels: built-in-function
>
> {code:java}
> select get_json_object('{"1": 5}', '$.1');
> {code}
> returns error:
>  
> {code:java}
> "Expected key at position 2"
> {code}
>  
> I guess it's caused by using function FindEndOfIdentifier that expects first 
> symbol of key to be a letter.
> Hive version of get_json_object works fine in this case.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to