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

    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

              leonid.fedorov Leonid Fedorov
              tntnatbry Gagan Goel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.