Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5033

Query on JSON that has null as value for each key

Attach filesAttach ScreenshotAdd voteVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.0
    • None
    • Storage - JSON
    • None

    Description

      Drill 1.9.0 git commit ID : 83513daf

      Drill returns same result with or without `store.json.all_text_mode`=true

      Note that each key in the JSON has null as its value.
      [root@cent01 null_eq_joins]# cat right_all_nulls.json
      {
      "intKey" : null,
      "bgintKey": null,
      "strKey": null,
      "boolKey": null,
      "fltKey": null,
      "dblKey": null,
      "timKey": null,
      "dtKey": null,
      "tmstmpKey": null,
      "intrvldyKey": null,
      "intrvlyrKey": null
      }
      [root@cent01 null_eq_joins]#

      Querying the above JSON file results in null as query result.

      • We should see each of the keys in the JSON as a column in query result.
      • And in each column the value should be a null value.
        Current behavior does not look right.
      0: jdbc:drill:schema=dfs.tmp> select * from `right_all_nulls.json`;
      +-------+
      |   *   |
      +-------+
      | null  |
      +-------+
      1 row selected (0.313 seconds)
      

      Adding comment from Julian Hyde

      IMHO it is similar but not the same as DRILL-1256. Worth logging an issue and let Jacques Nadeau (or someone) put on the record what should be the behavior of an empty record (empty JSON map) when it is top-level (as in this case) or in a collection.

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            khfaraaz Khurram Faraaz

            Dates

              Created:
              Updated:

              Slack

                Issue deployment