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

select two columns with order by produce wrong results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.4.0
    • None
    • None

    Description

      postgres:

      foodmart=# select c_row, c_int from data order by c_row;
      c_row | c_int
      ------+------------
      1 | 0
      2 | 1
      3 | -1
      4 | 12
      5 | 123
      6 | 92032039
      7 | -23395000
      8 | -99392039
      9 | -2147483648
      10 | 2147483647
      11 | 32767
      12 | -32767
      13 | 49032
      14 | -4989385
      15 | 69834830
      16 | 243
      17 | -426432
      18 | -3904
      19 | 489392758
      20 | 589032574
      21 | 340000504
      22 | 0
      23 | 1
      (23 rows)

      drill:

      0: jdbc:drill:schema=dfs> select c_row, c_int from data order by c_row;
      ----------------------+

      c_int c_row

      ----------------------+

      1 0
      1 2
      -1 3
      12 4
      123 5
      92032039 6
      -23395000 7
      -99392039 8
      -2147483648 9
      10 2147483647
      32767 11
      -32767 12
      13 49032
      -4989385 14
      69834830 15
      243 16
      -426432 17
      -3904 18
      489392758 19
      589032574 20
      340000504 21
      22 0
      1 23

      ----------------------+
      23 rows selected (10.932 seconds)

      notice for drill, on some of the rows, the columns are exchanged.

      Attachments

        Issue Links

          Activity

            People

              cchang@maprtech.com Chun Chang
              cchang@maprtech.com Chun Chang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: