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

TIME_TO_SEC() gives unexpected results for seconds having decimals

    XMLWordPrintable

Details

    Description

      TIME_TO_SEC() gives unexpected results for seconds having decimals

       
      CREATE TABLE t1(col TIME(3))ENGINE=Columnstore;
      INSERT INTO t1 VALUES('00:00:40.991');
      

      SELECT TIME_TO_SEC('00:00:40.991') FROM t1;
      +-----------------------------+
      | TIME_TO_SEC('00:00:40.991') |
      +-----------------------------+
      |                       0.000 |
      +-----------------------------+
      SELECT TIME_TO_SEC('00:00:40.99') FROM t1;
      +-----------------------------+
      | TIME_TO_SEC('00:00:40.99') |
      +-----------------------------+
      |                       40.99 |
      +-----------------------------+
      

      SELECT col, TIME_TO_SEC(col) FROM t1;
      +--------------+------------------+
      | col          | TIME_TO_SEC(col) |
      +--------------+------------------+
      | 00:00:40.991 |           40.000 |
      +--------------+------------------+
      

      This is a regression.

      Artifacts: https://cspkg.s3.amazonaws.com/index.html?prefix=develop/cron/1175

      Attachments

        Issue Links

          Activity

            People

              alexey.antipovsky Alexey Antipovsky
              bharath.bokka Bharath Bokka (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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