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

GET_JSON_OBJECT fails on some valid JSON keys

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • UDF
    • None

    Description

      hive> SELECT GET_JSON_OBJECT("

      {\"Form Name\": 12345}

      ", "$.Form\ Name") FROM akramer_one_row;
      Mapred Local Task Succeeded . Convert the Join into MapJoin
      OK
      NULL

      ...this also returns null for "$.Form Name" and "$.Form
      Name". It should return the relevant key.

      Removing the space works fine, however, spaces are allowed as JSON keys (see spec at http://www.json.org/ ). As such, this is a bug.

      Claiming that this is org.json's problem, or something similar, does not solve this bug. It's Hive that claims this gets a JSON object, so it needs to provide the JSON object.

      Attachments

        1. Hive-2971-patch
          5 kB
          Gang Tim Liu

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gangtimliu Gang Tim Liu Assign to me
            akramer Adam Kramer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment