You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/29 17:52:41 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #4670: Flink: add job level upsert config for table sink

kbendick commented on code in PR #4670:
URL: https://github.com/apache/iceberg/pull/4670#discussion_r862022605


##########
flink/v1.13/flink/src/main/java/org/apache/iceberg/flink/FlinkDynamicTableFactory.java:
##########
@@ -71,6 +72,12 @@ public class FlinkDynamicTableFactory implements DynamicTableSinkFactory, Dynami
           .noDefaultValue()
           .withDescription("Table name managed in the underlying iceberg catalog and database.");
 
+  private static final ConfigOption<Boolean> WRITE_UPSERT_ENABLED =
+      ConfigOptions.key("write-upsert-enabled")
+          .booleanType()
+          .defaultValue(false)
+          .withDescription("Whether to transform all INSERT/UPDATE_AFTER events to UPSERT.");
+
   // Flink 1.13.x change the return type from CatalogTable interface to ResolvedCatalogTable which extends the
   // CatalogTable. Here we use the dynamic method loading approach to avoid adding explicit CatalogTable or
   // ResolvedCatalogTable class into the iceberg-flink-runtime jar for compatibility purpose.

Review Comment:
   Unrelated, but this dynamic function call can probably be removed now that we have code per major Flink version (unless this change was made in a patch release after 1.13.0).
   
   I think @hililiwei has a PR that removes it iirc, but that PR also tackles much larger issues. @hililiwei can you possibly open a PR to just update the no-longer needed dynamic `getCatalogTable` call? I tried looking for the PR but couldn't find it.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org