pvary commented on code in PR #14728:
URL: https://github.com/apache/iceberg/pull/14728#discussion_r2592237853
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -118,13 +120,16 @@ private void findOrCreateBranch(TableIdentifier
identifier, String branch) {
private TableMetadataCache.ResolvedSchemaInfo findOrCreateSchema(
TableIdentifier identifier, Schema schema) {
- TableMetadataCache.ResolvedSchemaInfo fromCache = cache.schema(identifier,
schema);
- if (fromCache.compareResult() !=
CompareSchemasVisitor.Result.SCHEMA_UPDATE_NEEDED) {
+ TableMetadataCache.ResolvedSchemaInfo fromCache =
+ cache.schema(identifier, schema, dropUnusedColumns);
+ if (!dropUnusedColumns
+ && fromCache.compareResult() !=
CompareSchemasVisitor.Result.SCHEMA_UPDATE_NEEDED) {
Review Comment:
Could you please help me why is this `dropUnusedColumns` needed here?
If I understand correctly the schema comparison only changed to return the
`SCHEMA_UPDATE_NEEDED` more often (even if we need to drop a column)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]