[MCOL-5117] INT representation translating TIMESTAMP to INT is inconsistent with MDB's Created: 2022-06-05  Updated: 2022-06-27

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Minor
Reporter: Roman Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Consider the example

MariaDB [test]> create table cs2(i timestamp)engine=columnstore;
Query OK, 0 rows affected (0.353 sec)
 
MariaDB [test]> insert into cs2 values ('2022-05-21 00:00:00');
Query OK, 1 row affected (0.144 sec)
 
MariaDB [test]> select * from cs2;
+---------------------+
| i                   |
+---------------------+
| 2022-05-21 00:00:00 |
+---------------------+
1 row in set (0.043 sec)
 
MariaDB [test]> select i + 1  from cs2;
+------------------+
| i + 1            |
+------------------+
| 1733391758131201 |
+------------------+

MariaDB [test]> create table t1(i timestamp);
Query OK, 0 rows affected (0.011 sec)
 
MariaDB [test]> insert into t1  values ('2022-05-21 00:00:00');
Query OK, 1 row affected (0.002 sec)
 
MariaDB [test]> select * from t1;
+---------------------+
| i                   |
+---------------------+
| 2022-05-21 00:00:00 |
+---------------------+
1 row in set (0.000 sec)
 
MariaDB [test]> select i+1 from t1;
+----------------+
| i+1            |
+----------------+
| 20220521000001 |
+----------------+
1 row in set (0.000 sec)
 
MariaDB [test]> 


Generated at Thu Feb 08 02:55:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.