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

Timestamp ignores nanos in literal expressions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: 4.8.0
    • Labels:
      None

      Description

      Phoenix strips nanos in Timestamp. Simple test case:

      create table x (id bigint primary key, t timestamp);
      upsert into x values (1, TIMESTAMP'2015-01-01 00:00:00.123456');
      upsert into x values (2, TIMESTAMP'2015-01-01 00:00:00.123457');
      upsert into x values (3, TIMESTAMP'2015-01-01 00:00:00.123999');
      

      HBase scan:

      hbase(main):007:0> scan 'X'
      ROW COLUMN+CELL
       \x80\x00\x00\x00\x00\x00\x00\x01 column=0:T, timestamp=1460646668779, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
       \x80\x00\x00\x00\x00\x00\x00\x02 column=0:T, timestamp=1460646673369, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
       \x80\x00\x00\x00\x00\x00\x00\x03 column=0:T, timestamp=1460646680294, value=\x80\x00\x01J\xA2\xCA\xB0{\x00\x00\x00\x00
      

        Attachments

        1. PHOENIX-2845-1.patch
          3 kB
          Sergey Soldatov
        2. PHOENIX-2845-2.patch
          5 kB
          Sergey Soldatov
        3. PHOENIX-2845-3.patch
          5 kB
          Sergey Soldatov
        4. PHOENIX-2845-3.patch
          5 kB
          Nick Dimiduk
        5. PHOENIX-2845-4.patch
          7 kB
          Sergey Soldatov
        6. PHOENIX-2845-5.patch
          6 kB
          Sergey Soldatov

          Issue Links

            Activity

              People

              • Assignee:
                sergey.soldatov Sergey Soldatov
                Reporter:
                sergey.soldatov Sergey Soldatov
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: