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


##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicTableUpdateOperator.java:
##########
@@ -64,10 +72,37 @@ public void open(OpenContext openContext) throws Exception {
             new TableMetadataCache(
                 catalog, cacheMaximumSize, cacheRefreshMs, 
inputSchemasPerTableCacheMaximumSize),
             catalog);
+
+    if (errorStreamEnabled) {
+      errorStream =
+          new OutputTag<>(
+              DynamicRecordProcessor.ERROR_STREAM,
+              // Make sure to write schema and spec, as they might noe be 
known.
+              new TupleTypeInfo<>(
+                  new DynamicRecordInternalType(catalogLoader, true, 
cacheMaximumSize),
+                  TypeInformation.of(Exception.class)));
+    }
   }
 
   @Override
-  public DynamicRecordInternal map(DynamicRecordInternal data) throws 
Exception {
+  public void processElement(
+      DynamicRecordInternal record, Context ctx, 
Collector<DynamicRecordInternal> out)
+      throws Exception {
+    try {
+      out.collect(processRecord(record));
+    } catch (Exception e) {
+      // Send erroneous record to side output

Review Comment:
   nit: records?



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