diff --git a/integration_tests/clickhouse-sink/create_source.sql b/integration_tests/clickhouse-sink/create_source.sql index 3cbc953098c96..ac0ac6ddddd52 100644 --- a/integration_tests/clickhouse-sink/create_source.sql +++ b/integration_tests/clickhouse-sink/create_source.sql @@ -2,7 +2,7 @@ CREATE TABLE user_behaviors ( user_id INT, target_id VARCHAR, target_type VARCHAR, - event_timestamp TIMESTAMP, + event_timestamp TIMESTAMPTZ, behavior_type VARCHAR, parent_target_type VARCHAR, parent_target_id VARCHAR, @@ -15,4 +15,4 @@ CREATE TABLE user_behaviors ( fields.user_name.kind = 'random', fields.user_name.length = '10', datagen.rows.per.second = '50' -) FORMAT PLAIN ENCODE JSON; \ No newline at end of file +) FORMAT PLAIN ENCODE JSON; diff --git a/integration_tests/doris-sink/README.md b/integration_tests/doris-sink/README.md index add7db0a0aaa8..c651178b2d7d5 100644 --- a/integration_tests/doris-sink/README.md +++ b/integration_tests/doris-sink/README.md @@ -33,7 +33,7 @@ use demo; CREATE table demo_bhv_table( user_id int, target_id text, - event_timestamp datetime + event_timestamp_local datetime ) UNIQUE KEY(`user_id`) DISTRIBUTED BY HASH(`user_id`) BUCKETS 1 PROPERTIES ( diff --git a/integration_tests/doris-sink/append-only-sql/create_mv.sql b/integration_tests/doris-sink/append-only-sql/create_mv.sql index 0a803f8a2762d..c367e6f2baa94 100644 --- a/integration_tests/doris-sink/append-only-sql/create_mv.sql +++ b/integration_tests/doris-sink/append-only-sql/create_mv.sql @@ -2,6 +2,6 @@ CREATE MATERIALIZED VIEW bhv_mv AS SELECT user_id, target_id, - event_timestamp + event_timestamp AT TIME ZONE 'Asia/Shanghai' as event_timestamp_local FROM - user_behaviors; \ No newline at end of file + user_behaviors; diff --git a/integration_tests/doris-sink/append-only-sql/create_source.sql b/integration_tests/doris-sink/append-only-sql/create_source.sql index c28c10f3616da..292c3265a11e2 100644 --- a/integration_tests/doris-sink/append-only-sql/create_source.sql +++ b/integration_tests/doris-sink/append-only-sql/create_source.sql @@ -2,7 +2,7 @@ CREATE table user_behaviors ( user_id int, target_id VARCHAR, target_type VARCHAR, - event_timestamp TIMESTAMP, + event_timestamp TIMESTAMPTZ, behavior_type VARCHAR, parent_target_type VARCHAR, parent_target_id VARCHAR, @@ -15,4 +15,4 @@ CREATE table user_behaviors ( fields.user_name.kind = 'random', fields.user_name.length = '10', datagen.rows.per.second = '10' -) FORMAT PLAIN ENCODE JSON; \ No newline at end of file +) FORMAT PLAIN ENCODE JSON; diff --git a/integration_tests/doris-sink/upsert/create_mv.sql b/integration_tests/doris-sink/upsert/create_mv.sql index 0a803f8a2762d..c367e6f2baa94 100644 --- a/integration_tests/doris-sink/upsert/create_mv.sql +++ b/integration_tests/doris-sink/upsert/create_mv.sql @@ -2,6 +2,6 @@ CREATE MATERIALIZED VIEW bhv_mv AS SELECT user_id, target_id, - event_timestamp + event_timestamp AT TIME ZONE 'Asia/Shanghai' as event_timestamp_local FROM - user_behaviors; \ No newline at end of file + user_behaviors; diff --git a/integration_tests/doris-sink/upsert/create_table.sql b/integration_tests/doris-sink/upsert/create_table.sql index 6c98f88a0b510..c6cfa87eed3c8 100644 --- a/integration_tests/doris-sink/upsert/create_table.sql +++ b/integration_tests/doris-sink/upsert/create_table.sql @@ -2,9 +2,9 @@ CREATE table user_behaviors ( user_id int, target_id VARCHAR, target_type VARCHAR, - event_timestamp TIMESTAMP, + event_timestamp TIMESTAMPTZ, behavior_type VARCHAR, parent_target_type VARCHAR, parent_target_id VARCHAR, PRIMARY KEY(user_id) -); \ No newline at end of file +); diff --git a/integration_tests/doris-sink/upsert/insert_update_delete.sql b/integration_tests/doris-sink/upsert/insert_update_delete.sql index 73d5cda442258..f21353c161154 100644 --- a/integration_tests/doris-sink/upsert/insert_update_delete.sql +++ b/integration_tests/doris-sink/upsert/insert_update_delete.sql @@ -1,8 +1,8 @@ -INSERT INTO user_behaviors VALUES(1,'1','1','2020-01-01 01:01:01','1','1','1'), -(2,'2','2','2020-01-01 01:01:02','2','2','2'), -(3,'3','3','2020-01-01 01:01:03','3','3','3'), -(4,'4','4','2020-01-01 01:01:04','4','4','4'); +INSERT INTO user_behaviors VALUES(1,'1','1','2020-01-01T01:01:01Z','1','1','1'), +(2,'2','2','2020-01-01T01:01:02Z','2','2','2'), +(3,'3','3','2020-01-01T01:01:03Z','3','3','3'), +(4,'4','4','2020-01-01T01:01:04Z','4','4','4'); DELETE FROM user_behaviors WHERE user_id = 2; -UPDATE user_behaviors SET target_id = 30 WHERE user_id = 3; \ No newline at end of file +UPDATE user_behaviors SET target_id = 30 WHERE user_id = 3; diff --git a/integration_tests/mysql-sink/create_mv.sql b/integration_tests/mysql-sink/create_mv.sql index ba2f9152ce1a8..72d6bf833c6e8 100644 --- a/integration_tests/mysql-sink/create_mv.sql +++ b/integration_tests/mysql-sink/create_mv.sql @@ -31,7 +31,8 @@ CREATE TABLE rw_typed_data ( boolean_column BOOLEAN, date_column DATE, time_column TIME, - timestamp_column TIMESTAMPTZ, + timestamp_column TIMESTAMP, + timestamptz_column TIMESTAMPTZ, jsonb_column JSONB, bytea_column BYTEA ) WITH ( diff --git a/integration_tests/mysql-sink/create_source.sql b/integration_tests/mysql-sink/create_source.sql index 653887e06652c..eb13c5a37cf83 100644 --- a/integration_tests/mysql-sink/create_source.sql +++ b/integration_tests/mysql-sink/create_source.sql @@ -27,6 +27,7 @@ CREATE TABLE data_types ( date_column DATE, time_column TIME, timestamp_column TIMESTAMP, + timestamptz_column TIMESTAMPTZ, jsonb_column JSONB, bytea_column BYTEA ); @@ -41,10 +42,10 @@ FROM primary_key = 'id' ); -INSERT INTO data_types (id, varchar_column, text_column, integer_column, smallint_column, bigint_column, decimal_column, real_column, double_column, boolean_column, date_column, time_column, timestamp_column, jsonb_column, bytea_column) +INSERT INTO data_types (id, varchar_column, text_column, integer_column, smallint_column, bigint_column, decimal_column, real_column, double_column, boolean_column, date_column, time_column, timestamp_column, timestamptz_column, jsonb_column, bytea_column) VALUES - (1, 'Varchar value 1', 'Text value 1', 123, 456, 789, 12.34, 56.78, 90.12, TRUE, '2023-05-22', '12:34:56', '2023-05-22 12:34:56', '{"key": "value"}', E'\\xDEADBEEF'), - (2, 'Varchar value 2', 'Text value 2', 234, 567, 890, 23.45, 67.89, 01.23, FALSE, '2023-05-23', '23:45:01', '2023-05-23 23:45:01', '{"key": "value2"}', E'\\xFEEDBEEF'), - (3, 'Varchar value 3', 'Text value 3', 345, 678, 901, 34.56, 78.90, 12.34, TRUE, '2023-05-24', '12:34:56', '2023-05-24 12:34:56', '{"key": "value3"}', E'\\xCAFEBABE'), - (4, 'Varchar value 4', 'Text value 4', 456, 789, 012, 45.67, 89.01, 23.45, FALSE, '2023-05-25', '23:45:01', '2023-05-25 23:45:01', '{"key": "value4"}', E'\\xBABEC0DE'), - (5, 'Varchar value 5', 'Text value 5', 567, 890, 123, 56.78, 90.12, 34.56, TRUE, '2023-05-26', '12:34:56', '2023-05-26 12:34:56', '{"key": "value5"}', E'\\xDEADBABE'); + (1, 'Varchar value 1', 'Text value 1', 123, 456, 789, 12.34, 56.78, 90.12, TRUE, '2023-05-22', '12:34:56', '2023-05-22 12:34:56', '2023-05-22T12:34:56Z', '{"key": "value"}', E'\\xDEADBEEF'), + (2, 'Varchar value 2', 'Text value 2', 234, 567, 890, 23.45, 67.89, 01.23, FALSE, '2023-05-23', '23:45:01', '2023-05-23 23:45:01', '2023-05-23T23:45:01Z', '{"key": "value2"}', E'\\xFEEDBEEF'), + (3, 'Varchar value 3', 'Text value 3', 345, 678, 901, 34.56, 78.90, 12.34, TRUE, '2023-05-24', '12:34:56', '2023-05-24 12:34:56', '2023-05-24T12:34:56Z', '{"key": "value3"}', E'\\xCAFEBABE'), + (4, 'Varchar value 4', 'Text value 4', 456, 789, 012, 45.67, 89.01, 23.45, FALSE, '2023-05-25', '23:45:01', '2023-05-25 23:45:01', '2023-05-25T23:45:01Z', '{"key": "value4"}', E'\\xBABEC0DE'), + (5, 'Varchar value 5', 'Text value 5', 567, 890, 123, 56.78, 90.12, 34.56, TRUE, '2023-05-26', '12:34:56', '2023-05-26 12:34:56', '2023-05-26T12:34:56Z', '{"key": "value5"}', E'\\xDEADBABE'); diff --git a/integration_tests/mysql-sink/mysql_prepare.sql b/integration_tests/mysql-sink/mysql_prepare.sql index 724950f66a90b..d06e16e7829f5 100644 --- a/integration_tests/mysql-sink/mysql_prepare.sql +++ b/integration_tests/mysql-sink/mysql_prepare.sql @@ -18,7 +18,8 @@ CREATE TABLE data_types ( boolean_column BOOLEAN, date_column DATE, time_column TIME, - timestamp_column TIMESTAMP, + timestamp_column DATETIME, + timestamptz_column TIMESTAMP, jsonb_column JSON, bytea_column BLOB -); \ No newline at end of file +); diff --git a/integration_tests/starrocks-sink/README.md b/integration_tests/starrocks-sink/README.md index f65b4b9406685..7ad11c1349c83 100644 --- a/integration_tests/starrocks-sink/README.md +++ b/integration_tests/starrocks-sink/README.md @@ -26,7 +26,7 @@ use demo; CREATE table demo_bhv_table( user_id int, target_id text, - event_timestamp datetime + event_timestamp_local datetime ) ENGINE=OLAP PRIMARY KEY(`user_id`) DISTRIBUTED BY HASH(`user_id`) properties("replication_num" = "1"); diff --git a/integration_tests/starrocks-sink/append-only-sql/create_mv.sql b/integration_tests/starrocks-sink/append-only-sql/create_mv.sql index 0a803f8a2762d..c367e6f2baa94 100644 --- a/integration_tests/starrocks-sink/append-only-sql/create_mv.sql +++ b/integration_tests/starrocks-sink/append-only-sql/create_mv.sql @@ -2,6 +2,6 @@ CREATE MATERIALIZED VIEW bhv_mv AS SELECT user_id, target_id, - event_timestamp + event_timestamp AT TIME ZONE 'Asia/Shanghai' as event_timestamp_local FROM - user_behaviors; \ No newline at end of file + user_behaviors; diff --git a/integration_tests/starrocks-sink/append-only-sql/create_source.sql b/integration_tests/starrocks-sink/append-only-sql/create_source.sql index c28c10f3616da..292c3265a11e2 100644 --- a/integration_tests/starrocks-sink/append-only-sql/create_source.sql +++ b/integration_tests/starrocks-sink/append-only-sql/create_source.sql @@ -2,7 +2,7 @@ CREATE table user_behaviors ( user_id int, target_id VARCHAR, target_type VARCHAR, - event_timestamp TIMESTAMP, + event_timestamp TIMESTAMPTZ, behavior_type VARCHAR, parent_target_type VARCHAR, parent_target_id VARCHAR, @@ -15,4 +15,4 @@ CREATE table user_behaviors ( fields.user_name.kind = 'random', fields.user_name.length = '10', datagen.rows.per.second = '10' -) FORMAT PLAIN ENCODE JSON; \ No newline at end of file +) FORMAT PLAIN ENCODE JSON; diff --git a/integration_tests/starrocks-sink/upsert/create_mv.sql b/integration_tests/starrocks-sink/upsert/create_mv.sql index 0a803f8a2762d..c367e6f2baa94 100644 --- a/integration_tests/starrocks-sink/upsert/create_mv.sql +++ b/integration_tests/starrocks-sink/upsert/create_mv.sql @@ -2,6 +2,6 @@ CREATE MATERIALIZED VIEW bhv_mv AS SELECT user_id, target_id, - event_timestamp + event_timestamp AT TIME ZONE 'Asia/Shanghai' as event_timestamp_local FROM - user_behaviors; \ No newline at end of file + user_behaviors; diff --git a/integration_tests/starrocks-sink/upsert/create_table.sql b/integration_tests/starrocks-sink/upsert/create_table.sql index 6c98f88a0b510..c6cfa87eed3c8 100644 --- a/integration_tests/starrocks-sink/upsert/create_table.sql +++ b/integration_tests/starrocks-sink/upsert/create_table.sql @@ -2,9 +2,9 @@ CREATE table user_behaviors ( user_id int, target_id VARCHAR, target_type VARCHAR, - event_timestamp TIMESTAMP, + event_timestamp TIMESTAMPTZ, behavior_type VARCHAR, parent_target_type VARCHAR, parent_target_id VARCHAR, PRIMARY KEY(user_id) -); \ No newline at end of file +); diff --git a/integration_tests/starrocks-sink/upsert/insert_update_delete.sql b/integration_tests/starrocks-sink/upsert/insert_update_delete.sql index 73d5cda442258..f21353c161154 100644 --- a/integration_tests/starrocks-sink/upsert/insert_update_delete.sql +++ b/integration_tests/starrocks-sink/upsert/insert_update_delete.sql @@ -1,8 +1,8 @@ -INSERT INTO user_behaviors VALUES(1,'1','1','2020-01-01 01:01:01','1','1','1'), -(2,'2','2','2020-01-01 01:01:02','2','2','2'), -(3,'3','3','2020-01-01 01:01:03','3','3','3'), -(4,'4','4','2020-01-01 01:01:04','4','4','4'); +INSERT INTO user_behaviors VALUES(1,'1','1','2020-01-01T01:01:01Z','1','1','1'), +(2,'2','2','2020-01-01T01:01:02Z','2','2','2'), +(3,'3','3','2020-01-01T01:01:03Z','3','3','3'), +(4,'4','4','2020-01-01T01:01:04Z','4','4','4'); DELETE FROM user_behaviors WHERE user_id = 2; -UPDATE user_behaviors SET target_id = 30 WHERE user_id = 3; \ No newline at end of file +UPDATE user_behaviors SET target_id = 30 WHERE user_id = 3; diff --git a/integration_tests/tidb-cdc-sink/create_source.sql b/integration_tests/tidb-cdc-sink/create_source.sql index 29c400f0f25ce..cf10af703c7ca 100644 --- a/integration_tests/tidb-cdc-sink/create_source.sql +++ b/integration_tests/tidb-cdc-sink/create_source.sql @@ -2,7 +2,7 @@ CREATE TABLE tweet ( id varchar, text varchar, lang varchar, - created_at timestamp, + created_at timestamptz, author_id varchar, PRIMARY KEY (id) ) WITH ( @@ -17,7 +17,7 @@ create table user ( name varchar, username varchar, followers bigint, - created_at timestamp, + created_at timestamptz, PRIMARY KEY (id) ) WITH ( connector='kafka', @@ -40,7 +40,7 @@ create table datatype ( c9_date date, c10_datetime timestamp, c11_time time, - c12_timestamp timestamp, + c12_timestamp timestamptz, c13_char varchar, c14_varchar varchar, c15_binary bytea,