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

Range query on DECIMAL DESC sometimes incorrect

    XMLWordPrintableJSON

Details

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

    Description

      The following scenario is not working correctly:

      create table t (k1 bigint not null, k2 decimal, constraint pk primary key (k1,k2 desc));
      upsert into t values(1,1.01);
      upsert into t values(2,1.001);
      select * from t where k2>1.0; -- No rows, but should be both rows
      select * from t where k1 in (1,2) and k2>1.0; -- Same problem
      

      The following queries do return the correct results:

      select * from t where k2>1.0001;
      select * from t where k1 in (1,2) and k2>1.0001;
      

      Note also that without the DESC declaration of k2, everything works fine.

      Attachments

        1. PHOENIX-2137.patch
          34 kB
          James R. Taylor
        2. PHOENIX-2137_wip.patch
          32 kB
          James R. Taylor
        3. PHOENIX-2137_v2.patch
          38 kB
          James R. Taylor

        Activity

          People

            jamestaylor James R. Taylor
            jamestaylor James R. Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: