This is an automated email from the ASF dual-hosted git repository.

klion26 pushed a commit to branch 0.8.x
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/0.8.x by this push:
     new 7f1da0872 Revert "[AMORO-3540] Increase the precision of 
optimizing_status_start_time from s to ms. (#3542)"
7f1da0872 is described below

commit 7f1da087242811c8515e72e7243e1b9940c99bf6
Author: klion26 <[email protected]>
AuthorDate: Thu Aug 28 08:52:25 2025 +0800

    Revert "[AMORO-3540] Increase the precision of optimizing_status_start_time 
from s to ms. (#3542)"
    
    This reverts commit d655d2e455dd3db77ae294582bece3168d2cd5d2.
    
    We perfer to not change db in patch version.
---
 amoro-ams/src/main/resources/mysql/ams-mysql-init.sql       | 2 +-
 amoro-ams/src/main/resources/mysql/upgrade.sql              | 3 ---
 amoro-ams/src/main/resources/postgres/ams-postgres-init.sql | 2 +-
 amoro-ams/src/main/resources/postgres/upgrade.sql           | 5 -----
 4 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/amoro-ams/src/main/resources/mysql/ams-mysql-init.sql 
b/amoro-ams/src/main/resources/mysql/ams-mysql-init.sql
index 658cb6f8b..b72fa6101 100644
--- a/amoro-ams/src/main/resources/mysql/ams-mysql-init.sql
+++ b/amoro-ams/src/main/resources/mysql/ams-mysql-init.sql
@@ -123,7 +123,7 @@ CREATE TABLE `table_runtime`
     `last_minor_optimizing_time`    timestamp NULL DEFAULT NULL COMMENT 
'Latest Minor Optimize time for all partitions',
     `last_full_optimizing_time`     timestamp NULL DEFAULT NULL COMMENT 
'Latest Full Optimize time for all partitions',
     `optimizing_status_code`        int DEFAULT 700 COMMENT 'Table optimize 
status code: 100(FULL_OPTIMIZING), 200(MAJOR_OPTIMIZING), 
300(MINOR_OPTIMIZING), 400(COMMITTING), 500(PLANING), 600(PENDING), 700(IDLE)',
-    `optimizing_status_start_time`  timestamp(3) default CURRENT_TIMESTAMP(3) 
COMMENT 'Table optimize status start time',
+    `optimizing_status_start_time`  timestamp default CURRENT_TIMESTAMP 
COMMENT 'Table optimize status start time',
     `optimizing_process_id`         bigint(20) NOT NULL COMMENT 
'optimizing_procedure UUID',
     `optimizer_group`               varchar(64) NOT NULL,
     `table_config`                  mediumtext,
diff --git a/amoro-ams/src/main/resources/mysql/upgrade.sql 
b/amoro-ams/src/main/resources/mysql/upgrade.sql
index 15ce40098..69f409555 100644
--- a/amoro-ams/src/main/resources/mysql/upgrade.sql
+++ b/amoro-ams/src/main/resources/mysql/upgrade.sql
@@ -15,6 +15,3 @@
 
 -- If you have any changes to the AMS database, please record them in this 
file.
 -- We will confirm the corresponding version of these upgrade scripts when 
releasing.
-
--- Update the precision from s level to ms.
- ALTER TABLE `table_runtime` MODIFY COLUMN `optimizing_status_start_time` 
TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'Table optimize status start 
time';
diff --git a/amoro-ams/src/main/resources/postgres/ams-postgres-init.sql 
b/amoro-ams/src/main/resources/postgres/ams-postgres-init.sql
index 6f31d469b..362c991b0 100644
--- a/amoro-ams/src/main/resources/postgres/ams-postgres-init.sql
+++ b/amoro-ams/src/main/resources/postgres/ams-postgres-init.sql
@@ -183,7 +183,7 @@ CREATE TABLE table_runtime
     last_minor_optimizing_time TIMESTAMP,
     last_full_optimizing_time TIMESTAMP,
     optimizing_status_code INT DEFAULT 700,
-    optimizing_status_start_time TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3),
+    optimizing_status_start_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
     optimizing_process_id BIGINT NOT NULL,
     optimizer_group VARCHAR(64) NOT NULL,
     table_config TEXT,
diff --git a/amoro-ams/src/main/resources/postgres/upgrade.sql 
b/amoro-ams/src/main/resources/postgres/upgrade.sql
index de690614b..69f409555 100644
--- a/amoro-ams/src/main/resources/postgres/upgrade.sql
+++ b/amoro-ams/src/main/resources/postgres/upgrade.sql
@@ -15,8 +15,3 @@
 
 -- If you have any changes to the AMS database, please record them in this 
file.
 -- We will confirm the corresponding version of these upgrade scripts when 
releasing.
-
--- Update the precision from s level to ms.
-ALTER TABLE table_runtime
-    ALTER COLUMN optimizing_status_start_time TYPE TIMESTAMP(3),
-    ALTER COLUMN optimizing_status_start_time SET DEFAULT CURRENT_TIMESTAMP(3);
\ No newline at end of file

Reply via email to