Skip to content

Instantly share code, notes, and snippets.

@subkanthi
Created November 16, 2023 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subkanthi/1bfca48432ec25a48b6bda569cf879b4 to your computer and use it in GitHub Desktop.
Save subkanthi/1bfca48432ec25a48b6bda569cf879b4 to your computer and use it in GitHub Desktop.
Sink connector timezone, MySQL(CST) , ClickHouse(America/Chicago)
mysql> INSERT INTO `temporal_types_DATETIME6` VALUES ('DATETIME(6)','1000-01-01 00:00:00.000000','2022-09-29 01:50:56.123456','9999-12-31 23:59:59.999999',NULL);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO `temporal_types_DATETIME6` VALUES ('DATETIME(6)','1000-01-01 00:00:00.000000','2022-09-29 01:50:56.123456','9999-12-31 23:59:59.999999',NULL);
Query OK, 1 row affected (0.00 sec)
b614a4f66bd5 :) select * from temporal_types_DATETIME6;
SELECT *
FROM temporal_types_DATETIME6
Query id: d8b8ef67-3b17-4e5c-b9ce-8e956fabf3ca
┌─Type────────┬───────────Minimum_Value─┬───────────────Mid_Value─┬───────────Maximum_Value─┬─Null_Value─┬────────────_version─┬─is_deleted─┐
│ DATETIME(6) │ 1924-12-31 18:00:00.000 │ 2022-09-28 20:50:56.123 │ 2283-11-11 17:59:59.999 │ ᴺᵁᴸᴸ │ 1725227475530678330 │ 0 │
└─────────────┴─────────────────────────┴─────────────────────────┴─────────────────────────┴────────────┴─────────────────────┴────────────┘
b614a4f66bd5 :) select timezone();
SELECT timezone()
Query id: 30159b9e-88a5-4503-b172-21d96315609a
┌─timezone()──────┐
│ America/Chicago │
└─────────────────┘
1 row in set. Elapsed: 0.001 sec.
b614a4f66bd5 :) show databases;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment