Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2942

Order by incorrect for RVC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.8.0
    • None
    • None

    Description

      Incorrect
      
      select L_DISCOUNT, L_QUANTITY from lineitem_encoded order by (l_discount,L_QUANTITY) limit 10;
      +-------------+-------------+
      | L_DISCOUNT  | L_QUANTITY  |
      +-------------+-------------+
      | 0.04        | 17          |
      | 0.01        | 4           |
      | 0.09        | 28          |
      | 0.1         | 46          |
      | 0.06        | 27          |
      | 0.04        | 36          |
      | 0.1         | 49          |
      | 0.01        | 15          |
      | 0.1         | 34          |
      | 0.01        | 28          |
      +-------------+-------------+
      
      Correct
      
      select  L_DISCOUNT, L_QUANTITY from lineitem_encoded order by (l_discount) limit 10;
      +-------------+-------------+
      | L_DISCOUNT  | L_QUANTITY  |
      +-------------+-------------+
      | 0           | 38          |
      | 0           | 24          |
      | 0           | 31          |
      | 0           | 41          |
      | 0           | 22          |
      | 0           | 5E+1        |
      | 0           | 1           |
      | 0           | 49          |
      | 0           | 28          |
      | 0           | 15          |
      +-------------+-------------+
      
      CREATE TABLE LINEITEM_ENCODED(L_ORDERKEY INTEGER not null, L_PARTKEY  INTEGER, L_SUPPKEY  INTEGER , L_LINENUMBER  INTEGER not null, L_QUANTITY DECIMAL(15,2), L_EXTENDEDPRICE DECIMAL(15,2), L_DISCOUNT DECIMAL(15,2), L_TAX DECIMAL(15,2), L_RETURNFLAG  CHAR(1), L_LINESTATUS  CHAR(1), L_SHIPDATE DATE, L_COMMITDATE DATE, L_RECEIPTDATE DATE, L_SHIPINSTRUCT CHAR(25), L_SHIPMODE CHAR(10), L_COMMENT VARCHAR(44) constraint pk primary key(l_orderkey, l_linenumber));
      

      I'll get a utest for it soon.

      Attachments

        1. PHOENIX-2942-utest.patch
          2 kB
          Mujtaba Chohan
        2. PHOENIX-2942_v2.patch
          5 kB
          James R. Taylor

        Issue Links

          Activity

            People

              jamestaylor James R. Taylor
              mujtabachohan Mujtaba Chohan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: