[MCOL-4375] Function convert_tz not supported Created: 2020-11-02  Updated: 2021-12-29  Resolved: 2021-02-20

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 1.5.2
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: David Hill (Inactive) Assignee: David Hall (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MCOL-1356 CONVERT_TZ Throws "IDB-1815: Unknown ... Closed
Sprint: 2021-3

 Description   

Recieved this error
The storage engine for the table doesn't support IDB-1001: Function 'convert_tz' isn't supported.

CREATE or replace ALGORITHM=UNDEFINED VIEW vrfps AS
select id,substr(name,1,100) as name,substr(notes,1,100) as notes,convert_tz(created_at,'UTC','America/New_York') AS created_at,convert_tz(updated_at,'UTC','$cust_tz') AS updated_at, substr(bill_to,1,16) as bill_to from rfps where deleted_at is null;

> select * from vrfps;
ERROR 1178 (42000): The storage engine for the table doesn't support IDB-1001: Function 'convert_tz' isn't supported.

sql statement in following commands



 Comments   
Comment by David Hill (Inactive) [ 2020-11-18 ]

Associated issue reported by same customer and they are reporting as Blocking..

Adding to this issue another related issue.
I took out the convert_tz function from creating the view for testing and ran into this error:
The storage engine for the table doesn't support IDB-1011: Insert on VIEW is currently not supported.
After this view is created, we need to select from it into a table. Currently this table uses the columnstore engine.
These issues are very much related and need to be addressed at the same time.

New cluster created, testing. Our ETL scripts failed in the same place, at the use of the convert_tz function when defining a view. However, all the tables were available from all pm nodes in the cluster. So, progress.
Any ETA on when the convert_tz function will be supported by the Columnstore engine? Its a bit of a show stopper unless fixed or a workaround i found.

Comment by David Hill (Inactive) [ 2020-11-18 ]

Partial Schema example:

his is the table definition in RDS MySQL
CREATE TABLE `campaigns` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` text,

Comment by Todd Stoffel (Inactive) [ 2021-02-05 ]

I suppose if the time difference was known, (for example UTC to NYC) then you could just create the VIEW like this instead:

CREATE OR REPLACE VIEW `vrfps`
AS
  SELECT `rfps`.`id`                                                AS `id`,
         substr(`rfps`.`name`, 1, 100)                              AS `name`,
         substr(`rfps`.`notes`, 1, 100)                             AS `notes`,
         `rfps`.`created_at` - INTERVAL 5 HOUR                      AS `created_at`,
         `rfps`.`updated_at` - INTERVAL 5 HOUR                      AS `updated_at`,
         substr(`rfps`.`bill_to`, 1, 16)                            AS `bill_to`
  FROM   `rfps`
  WHERE  `rfps`.`deleted_at` IS NULL;

Comment by Gregory Dorman (Inactive) [ 2021-02-21 ]

I suppose you closed it prematurely.

MariaDB [gjd]> create table t3 (a int, b datetime) engine=Columnstore;
Query OK, 0 rows affected (0.667 sec)

MariaDB [gjd]> insert into t3 values (1,'2008-05-15 12:00:00');
Query OK, 1 row affected (0.165 sec)

MariaDB [gjd]>
MariaDB [gjd]> SELECT CONVERT_TZ(b,'+00:00','+10:00') from t3;
ERROR 1178 (42000): The storage engine for the table doesn't support IDB-1001: Function 'convert_tz' isn't supported.
MariaDB [gjd]>

And it is silly. The function actually is there, just doesn't like columns.

MariaDB [gjd]> SELECT CONVERT_TZ('2008-05-15 12:00:00','+00:00','+10:00') from t3;
-----------------------------------------------------

CONVERT_TZ('2008-05-15 12:00:00','+00:00','+10:00')

-----------------------------------------------------

2008-05-15 22:00:00

-----------------------------------------------------

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