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

Navis updated HIVE-6301:
------------------------

       Resolution: Fixed
    Fix Version/s: 0.13.0
     Release Note:   (was: add mKey.matches() before use mKey.group(1))
           Status: Resolved  (was: Patch Available)

Committed to trunk. Thanks for contribution, Zhiwen Sun. I've enrolled you on 
hive contributor list and feel free assign issues to youself.

> get_json_object throw java.lang.IllegalStateException: No match found 
> exception.
> --------------------------------------------------------------------------------
>
>                 Key: HIVE-6301
>                 URL: https://issues.apache.org/jira/browse/HIVE-6301
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.10.0, 0.11.0, 0.12.0
>            Reporter: Zhiwen Sun
>            Assignee: Zhiwen Sun
>            Priority: Critical
>             Fix For: 0.13.0
>
>         Attachments: HIVE-6301-0.10.patch, HIVE-6301-0.11.patch, 
> HIVE-6301-0.12.patch
>
>
> In fact, you can find the bug in code.
> https://github.com/apache/hive/blob/branch-0.10/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java#L190
> Miss call _mKey.matches()_ before use _mKey.group(1)_
> The bug still exists in the newest version.
> So, we met such exception in some query:
> {quote}
> 2014-01-23 11:08:19,869 FATAL ExecReducer: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method 
> public org.apache.hadoop.io.Text 
> org.apache.hadoop.hive.ql.udf.UDFJson.evaluate(java.lang.String,java.lang.String)
>   on object org.apache.hadoop.hive.ql.udf.UDFJson@c7056d5 of class 
> org.apache.hadoop.hive.ql.udf.UDFJson with arguments {{ .... 
> }:java.lang.String, $.6:java.lang.String} of size 2
> Caused by: java.lang.IllegalStateException: No match found
>       at java.util.regex.Matcher.group(Matcher.java:468)
>       at org.apache.hadoop.hive.ql.udf.UDFJson.extract(UDFJson.java:190)
>       at org.apache.hadoop.hive.ql.udf.UDFJson.evaluate(UDFJson.java:154)
>       ... 24 more
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to