Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4161

Add full support for Hour/Minute/Second to UNIX_TIMESTAMP() function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.4, 1.4.3, 1.5.3
    • Fix Version/s: None
    • Component/s: PrimProc
    • Labels:
      None

      Description

      UNIX_TIMESTAMP() function currently does not handle hour/minute/second for the integer types, including decimal, as well as for char/varchar/text types. As can be seen below, results don't match the correct output (innodb):

      MariaDB [test]> create table cs2 (a decimal(18))engine=columnstore;
      Query OK, 0 rows affected (0.242 sec)
       
      MariaDB [test]> insert into cs2 values (20201028183200);
      Query OK, 1 row affected (0.237 sec)
       
      MariaDB [test]> select unix_timestamp(a) from cs2;
      +-------------------+
      | unix_timestamp(a) |
      +-------------------+
      |        1603857600 |
      +-------------------+
      1 row in set (0.151 sec)
       
      MariaDB [test]> create table i2 as select * from cs2;
      Query OK, 1 row affected (0.047 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> select unix_timestamp(a) from i2;
      +-------------------+
      | unix_timestamp(a) |
      +-------------------+
      |        1603924320 |
      +-------------------+
      1 row in set (0.002 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              David.Hall David Hall
              Reporter:
              tntnatbry Gagan Goel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: