Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-6301

get_json_object throw java.lang.IllegalStateException: No match found exception.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.10.0, 0.11.0, 0.12.0
    • 0.13.0
    • None
    • None

    Description

      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:

      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

      Attachments

        1. HIVE-6301-0.12.patch
          0.7 kB
          Zhiwen Sun
        2. HIVE-6301-0.11.patch
          0.7 kB
          Zhiwen Sun
        3. HIVE-6301-0.10.patch
          0.7 kB
          Zhiwen Sun

        Activity

          People

            pensz Zhiwen Sun
            pensz Zhiwen Sun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: