ShivaGanapathy commented on code in PR #13883:
URL: https://github.com/apache/iceberg/pull/13883#discussion_r2353805103
##########
flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/TableUpdater.java:
##########
@@ -80,7 +92,14 @@ private void findOrCreateTable(TableIdentifier identifier,
Schema schema, Partit
LOG.info("Table {} not found during table search. Creating table.",
identifier);
try {
- Table table = catalog.createTable(identifier, schema, spec);
+ // Apply table properties during table creation if updater is provided
+ Map<String, String> properties = Maps.newHashMap();
+ if (tablePropertiesUpdater != null) {
+ properties = tablePropertiesUpdater.apply(identifier.toString(),
properties);
Review Comment:
Instead of passing in `identifier.toString()` as the tableName in
TablePropertiesUpdater, could we just modify TablePropertiesUpdater to accept a
TableIdentifier? This may be a bit more accurate, since `identifier.toString()`
is composed of both the namespace as well as the tableName. Plus, users may
want to update properties such as `write.data.path` based on both namespace
and/or tableName.
--
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]