cxxiii commented on code in PR #3715:
URL: https://github.com/apache/amoro/pull/3715#discussion_r2265983689


##########
amoro-ams/src/main/resources/mysql/ams-mysql-init.sql:
##########
@@ -135,26 +135,33 @@ CREATE TABLE `table_runtime`
     INDEX idx_optimizer_status_and_time (optimizing_status_code, 
optimizing_status_start_time DESC)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'Optimize running information 
of each table' ROW_FORMAT=DYNAMIC;
 
-CREATE TABLE `table_optimizing_process`
+CREATE TABLE `table_process`
+(
+    `process_id`                    bigint(20) NOT NULL COMMENT 'table process 
id',
+    `table_id`                      bigint(20) NOT NULL COMMENT 'table id',
+    `status`                        varchar(64) NOT NULL COMMENT 'Table 
optimizing status',
+    `process_type`                  varchar(64) NOT NULL COMMENT 'Process 
action type',
+    `process_stage`                 varchar(64) NOT NULL COMMENT 'Process 
current stage',
+    `execution_engine`              varchar(64) NOT NULL COMMENT 'Execution 
engine',
+    `create_time`                   timestamp DEFAULT CURRENT_TIMESTAMP 
COMMENT 'First plan time',
+    `finish_time`                   timestamp NULL DEFAULT NULL COMMENT 
'finish time or failed time',
+    `fail_message`                  mediumtext(4096) DEFAULT NULL COMMENT 
'Error message after task failed',
+    `summary`                       mediumtext COMMENT 'Max change transaction 
id of these tasks',
+    PRIMARY KEY (`process_id`),
+    KEY  `table_index` (`table_id`, `create_time`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT 'History of optimizing after 
each commit';
+
+CREATE TABLE `optimizing_process_state`
 (
     `process_id`                    bigint(20) NOT NULL COMMENT 
'optimizing_procedure UUID',
     `table_id`                      bigint(20) NOT NULL,
-    `catalog_name`                  varchar(64) NOT NULL COMMENT 'Catalog 
name',
-    `db_name`                       varchar(128) NOT NULL COMMENT 'Database 
name',
-    `table_name`                    varchar(256) NOT NULL COMMENT 'Table name',
     `target_snapshot_id`            bigint(20) NOT NULL,
     `target_change_snapshot_id`     bigint(20) NOT NULL,
-    `status`                        varchar(10) NOT NULL COMMENT 'Direct to 
TableOptimizingStatus',
-    `optimizing_type`               varchar(10) NOT NULL COMMENT 'Optimize 
type: Major, Minor',
-    `plan_time`                     timestamp DEFAULT CURRENT_TIMESTAMP 
COMMENT 'First plan time',
-    `end_time`                      timestamp NULL DEFAULT NULL COMMENT 
'finish time or failed time',
-    `fail_reason`                   varchar(4096) DEFAULT NULL COMMENT 'Error 
message after task failed',
     `rewrite_input`                 longblob DEFAULT NULL COMMENT 'rewrite 
files input',
-    `summary`                       mediumtext COMMENT 'Max change transaction 
id of these tasks',
     `from_sequence`                 mediumtext COMMENT 'from or min sequence 
of each partition',
     `to_sequence`                   mediumtext COMMENT 'to or max sequence of 
each partition',
-    PRIMARY KEY (`process_id`),
-    KEY  `table_index` (`table_id`, `plan_time`)
+    PRIMARY KEY (`process_id`)

Review Comment:
   Hello, it seems that a comma is missing here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to