yuxiqian commented on code in PR #3673:
URL: https://github.com/apache/flink-cdc/pull/3673#discussion_r1910133465
##########
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:
Yeah it should be safer throw an exception in such configuration.
--
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]