fix: fix incorrect timestamp precision in information_schema.tables (#6872)

* fix: fix incorrect timestamp precision in information_schema.tables

Signed-off-by: WenyXu <wenymedia@gmail.com>

* fix: fix unit test

Signed-off-by: WenyXu <wenymedia@gmail.com>

---------

Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
Weny Xu
2025-09-01 20:20:23 +08:00
committed by GitHub
parent 246b832d79
commit 0e962844ac
4 changed files with 36 additions and 21 deletions

View File

@@ -1975,10 +1975,10 @@ async fn test_information_schema_dot_columns(instance: Arc<dyn MockInstance>) {
| greptime | public | numbers | number | int unsigned | TAG |
| greptime | information_schema | tables | auto_increment | bigint unsigned | FIELD |
| greptime | information_schema | tables | avg_row_length | bigint unsigned | FIELD |
| greptime | information_schema | tables | check_time | timestamp(6) | FIELD |
| greptime | information_schema | tables | check_time | timestamp(0) | FIELD |
| greptime | information_schema | tables | checksum | bigint unsigned | FIELD |
| greptime | information_schema | tables | create_options | string | FIELD |
| greptime | information_schema | tables | create_time | timestamp(6) | FIELD |
| greptime | information_schema | tables | create_time | timestamp(0) | FIELD |
| greptime | information_schema | tables | data_free | bigint unsigned | FIELD |
| greptime | information_schema | tables | data_length | bigint unsigned | FIELD |
| greptime | information_schema | tables | engine | string | FIELD |
@@ -1995,7 +1995,7 @@ async fn test_information_schema_dot_columns(instance: Arc<dyn MockInstance>) {
| greptime | information_schema | tables | table_schema | string | FIELD |
| greptime | information_schema | tables | table_type | string | FIELD |
| greptime | information_schema | tables | temporary | string | FIELD |
| greptime | information_schema | tables | update_time | timestamp(6) | FIELD |
| greptime | information_schema | tables | update_time | timestamp(0) | FIELD |
| greptime | information_schema | tables | version | bigint unsigned | FIELD |
+---------------+--------------------+------------+--------------------------+-----------------+---------------+";
@@ -2033,10 +2033,10 @@ async fn test_information_schema_dot_columns(instance: Arc<dyn MockInstance>) {
| another_catalog | information_schema | columns | table_schema | string | FIELD |
| another_catalog | information_schema | tables | auto_increment | bigint unsigned | FIELD |
| another_catalog | information_schema | tables | avg_row_length | bigint unsigned | FIELD |
| another_catalog | information_schema | tables | check_time | timestamp(6) | FIELD |
| another_catalog | information_schema | tables | check_time | timestamp(0) | FIELD |
| another_catalog | information_schema | tables | checksum | bigint unsigned | FIELD |
| another_catalog | information_schema | tables | create_options | string | FIELD |
| another_catalog | information_schema | tables | create_time | timestamp(6) | FIELD |
| another_catalog | information_schema | tables | create_time | timestamp(0) | FIELD |
| another_catalog | information_schema | tables | data_free | bigint unsigned | FIELD |
| another_catalog | information_schema | tables | data_length | bigint unsigned | FIELD |
| another_catalog | information_schema | tables | engine | string | FIELD |
@@ -2053,7 +2053,7 @@ async fn test_information_schema_dot_columns(instance: Arc<dyn MockInstance>) {
| another_catalog | information_schema | tables | table_schema | string | FIELD |
| another_catalog | information_schema | tables | table_type | string | FIELD |
| another_catalog | information_schema | tables | temporary | string | FIELD |
| another_catalog | information_schema | tables | update_time | timestamp(6) | FIELD |
| another_catalog | information_schema | tables | update_time | timestamp(0) | FIELD |
| another_catalog | information_schema | tables | version | bigint unsigned | FIELD |
+-----------------+--------------------+---------------+--------------------------+-----------------+---------------+";