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

Drill changing the order of the columns when the first record has null value for the column

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 0.5.0
    • Storage - JSON
    • None

    Description

      git.commit.id.abbrev=98b208e

      JSON File Used :

      {
        "a" : null,
        "b" : 1
      }
      {
        "a" : 1,
        "b" : 1
      }
      

      Query : The order has changed in the below result

      select * from `temp.json`;
      +------------+------------+
      |     b      |     a      |
      +------------+------------+
      | 1          | null       |
      | 1          | 1          |
      +------------+------------+
      

      However with the below dataset where the null field is in the second row drill preserves the order

      {
        "a" : 1,
        "b" : 1
      }
      {
        "a" : null,
        "b" : 1
      }
      

      Query:

      select * from `temp.json`;
      +------------+------------+
      |     a      |     b      |
      +------------+------------+
      | 1          | 1          |
      | null       | 1          |
      +------------+------------+
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: