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

json reader treats empty list inconsistently,

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage - JSON
    • Labels:
      None

      Description

      Depending on where the empty list shows up, the empty list could be treated as empty-list or just a null.

      Running the following query on the folder with files in the attachment can reproduce the observation:

      +--------+
      |   a    |
      +--------+
      | null   |
      | ["b"]  |
      | []     |
      +--------+
      

      Note that both first and third records come from

      {“a”:[]}
      

        Attachments

        1. b.json
          0.0 kB
          Sean Hsuan-Yi Chu
        2. a.json
          0.0 kB
          Sean Hsuan-Yi Chu

          Issue Links

            Activity

              People

              • Assignee:
                seanhychu Sean Hsuan-Yi Chu
                Reporter:
                seanhychu Sean Hsuan-Yi Chu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: