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

Create UDF jsonpath which support full JsonPath syntax

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • UDF
    • None

    Description

      Existing udf get_json_object supports limited JsonPath syntax.
      It would be nice if we have full JsonPath syntax support.

      We can use Jayway JsonPath 2.0.0 to query json (Apache License, Version 2.0)
      Reasons:
      1. existing get_json_object syntax is limited in comparison to Jayway JsonPath

      2. get_json_object uses lots of custom java code which can be replaced with simple JsonPath API calls, e.g.

      Object result = JsonPath.parse(json).read(path)
      

      I think we should not change existing get_json_object udf and better to create new one because Jayway JsonPath works slightly different in some situations.

      Attachments

        1. HIVE-9864.1.patch
          30 kB
          Alexander Pivovarov

        Issue Links

          Activity

            People

              apivovarov Alexander Pivovarov
              apivovarov Alexander Pivovarov
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: