gongzexin commented on code in PR #3673:
URL: https://github.com/apache/flink-cdc/pull/3673#discussion_r2971642021


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-paimon/src/main/java/org/apache/flink/cdc/connectors/paimon/sink/PaimonMetadataApplier.java:
##########
@@ -325,14 +317,32 @@ private void applyAlterColumnType(AlterColumnTypeEvent 
event) throws SchemaEvolv
                                     tableChangeList.add(
                                             
SchemaChangeProvider.updateColumnType(
                                                     oldName, newType)));
-            catalog.alterTable(
-                    new Identifier(event.tableId().getSchemaName(), 
event.tableId().getTableName()),
-                    tableChangeList,
-                    true);
+            catalog.alterTable(tableIdToIdentifier(event), tableChangeList, 
true);
         } catch (Catalog.TableNotExistException
                 | Catalog.ColumnAlreadyExistException
                 | Catalog.ColumnNotExistException e) {
             throw new SchemaEvolveException(event, e.getMessage(), e);
         }
     }
+
+    private void applyTruncateTable(TruncateTableEvent event) throws 
SchemaEvolveException {
+        try (BatchTableCommit batchTableCommit =
+                
catalog.getTable(tableIdToIdentifier(event)).newBatchWriteBuilder().newCommit())
 {

Review Comment:
   > @yuxiqian Hello, I encountered the following error while using 
[flink-cdc-pipeline-connector-paimon](https://issues.apache.org/jira/browse/FLINK-cdc-pipeline-connector-paimon):
   > 
   > `Unable to truncate a table with deletion vectors enabled.`
   > 
   > I then found this PR. Could you explain why `TRUNCATE` cannot be executed 
on a Paimon table with `deletion-vectors.enabled=true`? From what I understand, 
Paimon itself allows this operation, so I would like to understand the reason 
why Flink CDC prohibits it.
   
   @lvyanquan or do you know the reason?



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