[enhancement] add param which contain column comments of source table field
add param which contain column comments of source table field. fix #3007
@lvyanquan Could you please help me review this PR
thanks for your implements
In my testing, I found that when modifying both the field type and field comments of a table simultaneously, the comment information is not synchronized to the target database.
test case
CREATE TABLE IF NOT EXISTS test_flinkcdc1
(
XFID varchar(64) not null comment 'Primary key ID'
primary key,
CXYY text null,
CXSJ datetime null comment 'Cancellation time',
CREATE_TIME timestamp default CURRENT_TIMESTAMP null comment 'Creation time',
UPDATE_TIME timestamp default CURRENT_TIMESTAMP null comment 'Modification time',
CREATE_USER_ID varchar(64) null comment 'Creator ID',
CREATE_USER_NAME varchar(20) null comment 'Creator name',
CREATE_ORG_CODE varchar(64) null comment 'Creator organization code',
CREATE_ORG_NAME varchar(255) null comment 'Creator organization name',
UPDATE_USER_ID varchar(64) null comment 'Updater ID',
UPDATE_USER_NAME varchar(20) null comment 'Updater name',
UPDATE_ORG_CODE varchar(64) null comment 'Updater organization code',
UPDATE_ORG_NAME varchar(255) null comment 'Updater organization name',
DELETED varchar(2) null comment 'Deletion flag; 0-Normal, 1-Deleted'
)
comment 'Test Flink CDC 3 table' collate = utf8mb4_general_ci;
ALTER TABLE test_flinkcdc1 ADD COLUMN test11 text comment 'Test added field sync';
ALTER TABLE test_flinkcdc1 ADD COLUMN test12 text comment 'Test added field sync 2';
ALTER TABLE test_flinkcdc1 MODIFY COLUMN test12 text comment 'Test added field sync 2 modified type';
ALTER TABLE test_flinkcdc1 ADD COLUMN test13 text comment 'Test added field sync 3';
###
-- targetdb : auto-generated definition
CREATE TABLE test_flinkcdc1
(
XFID varchar(192) not null comment 'Primary key ID',
CXYY varchar(1048576) null,
CXSJ datetime null comment 'Cancellation time',
CREATE_TIME datetime null comment 'Creation time',
UPDATE_TIME datetime null comment 'Modification time',
CREATE_USER_ID varchar(192) null comment 'Creator ID',
CREATE_USER_NAME varchar(60) null comment 'Creator name',
CREATE_ORG_CODE varchar(192) null comment 'Creator organization code',
CREATE_ORG_NAME varchar(765) null comment 'Creator organization name',
UPDATE_USER_ID varchar(192) null comment 'Updater ID',
UPDATE_USER_NAME varchar(60) null comment 'Updater name',
UPDATE_ORG_CODE varchar(192) null comment 'Updater organization code',
UPDATE_ORG_NAME varchar(765) null comment 'Updater organization name',
DELETED varchar(6) null comment 'Deletion flag; 0-Normal, 1-Deleted',
test11 varchar(30) null comment 'Test added field sync',
test12 varchar(30) null comment 'Test added field sync 2',
test13 varchar(1048576) null comment 'Test added field sync 3'
)
comment 'OLAP' engine = StarRocks;
error in ALTER TABLE test_flinkcdc1 MODIFY COLUMN test12 text comment 'Test added field sync 2 modified type';
For starRocks db, it was observed that the comment for the table name in the target database is fixed to "OLAP." Is it possible to also synchronize the table comment from the source table?
For starRocks db, it was observed that the comment for the table name in the target database is fixed to "OLAP." Is it possible to also synchronize the table comment from the source table?
@everhopingandwaiting i try to fix it.
@lvyanquan @everhopingandwaiting Compilation failure is not related to the submitted code
Hi @dufeng1010 can you help to rebase to master?
This pull request has been automatically marked as stale because it has not had recent activity for 60 days. It will be closed in 30 days if no further activity occurs.