Apache Drill
  1. Apache Drill
  2. DRILL-1062

DRILL does not handle NULLS FIRST/LAST correctly in ORDER BY clause

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: Functions - Drill
    • Labels:
      None

      Description

      ORDER BY clause could specify nulls first or nulls last. Currently, DRILL will always use nulls last policy.

      select tbl.topping[3].type from dfs.`/Users/jni/work/incubator-drill/exec/ref/target/test-classes/donuts.json` as tbl order by 1 nulls last;
      ------------

      EXPR$0

      ------------

      Chocolate
      Maple
      Powdered Sugar
      Powdered Sugar
      null

      ------------
      5 rows selected (0.156 seconds)
      0: jdbc:drill:zk=local> select tbl.topping[3].type from dfs.`/Users/jni/work/incubator-drill/exec/ref/target/test-classes/donuts.json` as tbl order by 1 nulls first;
      ------------

      EXPR$0

      ------------

      Chocolate
      Maple
      Powdered Sugar
      Powdered Sugar
      null

      ------------
      5 rows selected (0.186 seconds)

      1. DRILL-1062.2.patch
        126 kB
        Daniel Barclay (Drill)
      2. DRILL-1062.3.patch.txt
        127 kB
        Daniel Barclay (Drill)
      3. DRILL-1062.4.patch.txt
        271 kB
        Daniel Barclay (Drill)

        Issue Links

          Activity

          Jinfeng Ni created issue -
          Jacques Nadeau made changes -
          Field Original Value New Value
          Link This issue is duplicated by DRILL-1156 [ DRILL-1156 ]
          Jacques Nadeau made changes -
          Fix Version/s 0.5.0 [ 12324880 ]
          Sudheesh Katkam made changes -
          Fix Version/s 0.6.0 [ 12327472 ]
          Fix Version/s 0.5.0 [ 12324880 ]
          Parth Chandra made changes -
          Fix Version/s 0.8.0 [ 12328812 ]
          Fix Version/s 0.6.0 [ 12327472 ]
          Jacques Nadeau made changes -
          Assignee Jinfeng Ni [ jni ] Daniel Barclay [ dbarclay ]
          Daniel Barclay (Drill) made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Fix Version/s 0.8.0 [ 12328812 ]
          Daniel Barclay (Drill) made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Daniel Barclay (Drill) made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.1.patch.txt [ 12680002 ]
          Daniel Barclay (Drill) made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.1.patch.txt [ 12680002 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.1.patch.txt [ 12680018 ]
          Daniel Barclay (Drill) made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.1.patch.txt [ 12680020 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.1.patch.txt [ 12680020 ]
          Daniel Barclay (Drill) made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          USE OTHER Daniel Barclay made changes -
          Assignee Daniel Barclay (x) [ dbarclay ] Daniel Barclay [ dsbos ]
          Mehant Baid made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.2.patch [ 12681610 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.1.patch.txt [ 12680018 ]
          Jacques Nadeau made changes -
          Assignee Daniel Barclay (Drill/MapR) [ dsbos ] Jinfeng Ni [ jni ]
          Fix Version/s 0.7.0 [ 12327473 ]
          Jacques Nadeau made changes -
          Assignee Jinfeng Ni [ jni ] Steven Phillips [ sphillips ]
          Jacques Nadeau made changes -
          Fix Version/s 0.8.0 [ 12328812 ]
          Fix Version/s 0.7.0 [ 12327473 ]
          Jacques Nadeau made changes -
          Assignee Steven Phillips [ sphillips ] Jinfeng Ni [ jni ]
          Jinfeng Ni made changes -
          Assignee Jinfeng Ni [ jni ] Daniel Barclay (Drill/MapR) [ dsbos ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.3.patch.txt [ 12697168 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.4.patch.txt [ 12699393 ]
          Daniel Barclay (Drill) made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.4.patch.txt [ 12699419 ]
          Daniel Barclay (Drill) made changes -
          Attachment DRILL-1062.4.patch.txt [ 12699393 ]
          Jacques Nadeau made changes -
          Component/s Functions - Drill [ 12322695 ]
          Parth Chandra made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Daniel Barclay (Drill) made changes -
          Link This issue incorporates DRILL-1763 [ DRILL-1763 ]
          Tony Stevenson made changes -
          Workflow no-reopen-closed, patch-avail, testing [ 12871587 ] Drill workflow [ 12934820 ]
          Chun Chang made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Daniel Barclay (Drill) [ dsbos ] Chun Chang [ cchang@maprtech.com ]

            People

            • Assignee:
              Chun Chang
              Reporter:
              Jinfeng Ni
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development