kumarpritam863 commented on code in PR #18739:
URL: https://github.com/apache/iceberg/pull/18739#discussion_r4588569603


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -153,8 +153,12 @@ private TableMetadataCache.ResolvedSchemaInfo 
findOrCreateSchema(
           LOG.info(
               "Triggering schema update for table {} {} to {}", identifier, 
tableSchema, schema);
           UpdateSchema updateApi = table.updateSchema();
-          EvolveSchemaVisitor.visit(
-              identifier, updateApi, tableSchema, schema, caseSensitive, 
dropUnusedColumns);
+          try {
+            EvolveSchemaVisitor.visit(
+                identifier, updateApi, tableSchema, schema, caseSensitive, 
dropUnusedColumns);
+          } catch (IllegalArgumentException e) {
+            throw new DynamicRecordException(e.getMessage(), e);

Review Comment:
   @mxm this was the reason I initially tried to have a single on/off knob, 
where "on" will send anything to side stream and "off" will result in failure. 
As in this case there are chances that we will miss the cases which should 
throw DynamicRecordException. I am for now adding the cases based on the 
negative test cases which I can think off, but please suggest if there is a 
better way to control this.



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