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


##########
amoro-ams/src/main/resources/derby/ams-derby-init.sql:
##########
@@ -123,25 +123,32 @@ CREATE TABLE table_runtime (
     CONSTRAINT table_runtime_table_name_idx UNIQUE (catalog_name, db_name, 
table_name)
 );
 
-CREATE TABLE table_optimizing_process (
-    process_id          BIGINT NOT NULL,
-    table_id            BIGINT NOT NULL,
-    catalog_name        VARCHAR(64) NOT NULL,
-    db_name             VARCHAR(128) NOT NULL,
-    table_name          VARCHAR(256) NOT NULL,
-    target_snapshot_id  BIGINT NOT NULL,
-    target_change_snapshot_id  BIGINT NOT NULL,
-    status              VARCHAR(10) NOT NULL,
-    optimizing_type     VARCHAR(10) NOT NULL,
-    plan_time           TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-    end_time            TIMESTAMP DEFAULT NULL,
-    fail_reason         VARCHAR(4096),
-    rewrite_input       BLOB(64m),
-    summary             CLOB(64m),
-    from_sequence       CLOB(64m),
-    to_sequence         CLOB(64m),
-    CONSTRAINT table_optimizing_process_pk PRIMARY KEY (process_id)
+CREATE TABLE table_process (
+    process_id       BIGINT NOT NULL PRIMARY KEY,
+    table_id         BIGINT NOT NULL,
+    status           VARCHAR(64) NOT NULL,
+    process_type     VARCHAR(64) NOT NULL,
+    process_stage    VARCHAR(64) NOT NULL,
+    execution_engine VARCHAR(64) NOT NULL,
+    create_time      TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    finish_time      TIMESTAMP DEFAULT NULL,
+    fail_message     CLOB,
+    summary          CLOB
+);
+CREATE INDEX table_process_table_idx ON table_process (table_id, create_time);
+
+CREATE TABLE optimizing_process_state (
+    process_id                BIGINT NOT NULL PRIMARY KEY,
+    table_id                  BIGINT NOT NULL,
+    target_snapshot_id        BIGINT NOT NULL,
+    target_change_snapshot_id BIGINT NOT NULL,
+    rewrite_input             BLOB,

Review Comment:
   Keep the maximum size the same as the original size.



-- 
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