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

Missing values are not missing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      If I have a query which reads from a JSON file where a field is a list or is missing, then the records where the field should missing will instead have a value for that field that is an empty list:

      0: jdbc:drill:> select * from maprfs.ted.`bug.json`;
      +----+--------+------+
      | *a*  |   *b*    |  *c*   |
      | 3  | [3,2]  | xyz  |
      | 7  | []     | wxy  |
      | 7  | []     | null  |
      +----+--------+------+
      2 rows selected (1.279 seconds)
      

      where the file in question contains these three records:

      {'a':3, 'b':[3,2], 'c':'xyz'}
      {'a':7, 'c':'wxy'}
      {"a":7, "b":[]}
      

      The problem is in the second record of the result. I would have expected b to have had the value NULL.

      I am using drill-1.6.0.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tdunning Ted Dunning
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: