pvary commented on code in PR #14728:
URL: https://github.com/apache/iceberg/pull/14728#discussion_r2598026436


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/EvolveSchemaVisitor.java:
##########
@@ -36,30 +39,39 @@
  *   <li>Adding new columns
  *   <li>Widening the type of existing columsn
  *   <li>Reordering columns
+ *   <li>Dropping columns (when dropUnusedColumns is enabled)
  * </ul>
  *
  * We don't support:
  *
  * <ul>
- *   <li>Dropping columns
  *   <li>Renaming columns
  * </ul>
  *
- * The reason is that dropping columns would create issues with late / out of 
order data. Once we
- * drop fields, we wouldn't be able to easily add them back later without 
losing the associated
- * data. Renaming columns is not supported because we compare schemas by name, 
which doesn't allow
- * for renaming without additional hints.
+ * By default, columns that exist in the table but not in the input schema are 
made optional to
+ * avoid issues with late/out-of-order data. When dropUnusedColumns is 
enabled, these columns are
+ * dropped instead for 1:1 schema syncing.

Review Comment:
   Maybe something like this:
   > By default, any columns present in the table but absent from the input 
schema are made as optional to prevent issues caused by late or out-of-order 
data. If dropUnusedColumns is enabled, these columns are removed instead to 
ensure a strict one-to-one schema alignment.



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

Reply via email to