[MCOL-4039] cannot use timestamp in create table select for columnstore tables Created: 2020-06-04  Updated: 2023-10-25  Resolved: 2023-10-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 1.4.3
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Gregory Dorman (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 1
Labels: None

Issue Links:
Relates
relates to MCOL-4716 CREATE TABLE with CURRENT_TIMESTAMP d... Closed

 Description   

While timestamp is a supported datatype, one cannot use it in create table select. The capability is important for usability of HTAP.

1. timestamp is a supported type.

MariaDB [gjd]> create table t2 (t timestamp) engine=columnstore;
Query OK, 0 rows affected (0.235 sec)

MariaDB [gjd]> show create table t2;
-------------------------------------------------------------------------------------------------------------------------------------------------------+

Table Create Table

-------------------------------------------------------------------------------------------------------------------------------------------------------+

t2 CREATE TABLE `t2` (
`t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=Columnstore DEFAULT CHARSET=utf8

-------------------------------------------------------------------------------------------------------------------------------------------------------+

2. But cannot be used in create table select.

a) MariaDB [gjd]> create table t3 engine=columnstore select current_timestamp();
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.
MariaDB [gjd]>

b) MariaDB [gjd]> create table t3inno engine=innodb select current_timestamp();
Query OK, 1 row affected (0.027 sec)
Records: 1 Duplicates: 0 Warnings: 0

MariaDB [gjd]> show create table t3inno;
--------------------------------------------------------------------------------------------------------------+

Table Create Table

--------------------------------------------------------------------------------------------------------------+

t3inno CREATE TABLE `t3inno` (
`current_timestamp()` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

--------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)

MariaDB [gjd]> create table t3cs engine=columnstore select * from t3inno;
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.
MariaDB [gjd]>


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