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

CURRENT_TIME fails to provide correct time when projected table is using

    XMLWordPrintableJSON

Details

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

    Description

      When the query is using projected table, the CURRENT_TIME() function may return zero or outdated value. Simple test case:

      CREATE TABLE T1 ( ID integer primary key);
      CREATE TABLE T2 ( ID integer primary key);
      UPSERT INTO T1 VALUES (1);
      UPSERT INTO T2 VALUES (1);
      select /*+ USE_SORT_MERGE_JOIN */ op.id, current_time() from t1 op where op.id in (select id from t2);
      

      The result:

      +--------+---------------------------------+
      | OP.ID  | TIME '1970-01-01 00:00:00.000'  |
      +--------+---------------------------------+
      | 1      | 1970-01-01 00:00:00.000         |
      +--------+---------------------------------+
      

      Attachments

        1. PHOENIX-2878-1.patch
          3 kB
          Sergey Soldatov

        Activity

          People

            sergey.soldatov Sergey Soldatov
            sergey.soldatov Sergey Soldatov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: