MOBIN-F commented on code in PR #4518:
URL: https://github.com/apache/flink-cdc/pull/4518#discussion_r3892250456


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/src/main/java/org/apache/flink/cdc/connectors/starrocks/sink/StarRocksEnrichedCatalog.java:
##########
@@ -115,7 +116,7 @@ public void alterColumnType(String databaseName, String 
tableName, StarRocksColu
         String alterSql = buildAlterColumnTypeSql(databaseName, tableName, 
buildColumnStmt(column));
         try {
             long startTimeMillis = System.currentTimeMillis();
-            executeUpdateStatement(alterSql);
+            executeAlter(databaseName, tableName, alterSql, timeoutSecond);

Review Comment:
   According to the official documentation of Starrocks, modifying column types 
is asynchronous. You need to wait until Starrocks has completely completed the 
change before proceeding. Otherwise, an exception will occur.
   For example, if changing from int to string, if using 
executeUpdateStatement, it will return immediately. However, the actual 
Starrocks table is still of int type, resulting in the failure of inserting 
string-type data.
   
   [Operations on bucket, column and rollup are asynchronous operations. A 
success message is return immediately after the task is submitted. You can run 
the SHOW ALTER TABLE command to check the progress, and run the CANCEL ALTER 
TABLE command to cancel the 
operation.](https://docs.starrocks.io/docs/sql-reference/sql-statements/table_bucket_part_index/ALTER_TABLE/?utm_source=chatgpt.com#limits-and-usage-notes)



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