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

Group By statement truncating BIGINTs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.11.0
    • 4.13.0
    • None
    • None

    Description

      Versions:
      Phoenix 4.11.0
      HBase: 1.3.1
      (Amazon EMR: 5.8.0)

      Steps to reproduce:
      1. From the `sqlline-thin.py` client setup the following table:

      CREATE TABLE test_table (
          a BIGINT NOT NULL, 
          c BIGINT NOT NULL
          CONSTRAINT PK PRIMARY KEY (a, c)
      );
      
      UPSERT INTO test_table(a,c) VALUES(4444444444444444444, 5555555555555555555);
      
      SELECT a FROM (SELECT a, c FROM test_table GROUP BY a, c) GROUP BY a, c;
      

      Expected Result:

      +----------------------+
      |          A           |
      +----------------------+
      | 4444444444444444444  |
      +----------------------+
      

      Actual Result:

      +----------------------+
      |          A           |
      +----------------------+
      | 4444444444444000000  |
      +----------------------+
      

      Comments:
      Having the two Group By statements together seems to truncate the last 6 or so digits of the final result. Removing the outer (or either) group by will produce the correct result.

      Please fix the Group by statement to not truncate the outer result's value.

      Attachments

        1. PHOENIX-4283-v3.patch
          3 kB
          Ethan Wang
        2. PHOENIX-4283.patch
          4 kB
          Ethan Wang

        Activity

          People

            aertoria Ethan Wang
            ssadowski Steven Sadowski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: