pvary commented on code in PR #14063: URL: https://github.com/apache/iceberg/pull/14063#discussion_r2349369133
########## flink/v2.0/flink/src/main/java/org/apache/iceberg/flink/FlinkWriteOptions.java: ########## @@ -87,4 +87,8 @@ private FlinkWriteOptions() {} @Experimental public static final ConfigOption<Duration> TABLE_REFRESH_INTERVAL = ConfigOptions.key("table-refresh-interval").durationType().noDefaultValue(); + + // specify the uidSuffix to be used for the underlying IcebergSink + public static final ConfigOption<String> UID_SUFFIX = + ConfigOptions.key("uid-suffix").stringType().noDefaultValue(); Review Comment: Not strictly related to this PR, but I was trying to understand what is the default value for the uidSuffix. I have found this: ``` public static class Builder implements IcebergSinkBuilder<Builder> { private TableLoader tableLoader; private String uidSuffix = ""; ``` And also found this: ``` this.inputCreator = newUidSuffix -> { // Input stream order is crucial for some situation(e.g. in cdc case). Therefore, we // need to set the parallelism of map operator same as its input to keep map operator // chaining its input, and avoid rebalanced by default. SingleOutputStreamOperator<RowData> inputStream = input.map(mapper, outputType).setParallelism(input.getParallelism()); if (newUidSuffix != null) { String uid = String.format("Sink pre-writer mapper: %s", newUidSuffix); inputStream.name(uid).uid(uid); } ``` And also this: ``` private static String defaultSuffix(String uidSuffix, String defaultSuffix) { if (uidSuffix == null || uidSuffix.isEmpty()) { return defaultSuffix; } return uidSuffix; } ``` So we handle empty and null as the same when generating the uids for the preCommitTopology, and sink, but only null is handled as default if the sink is created for a stream. Which one is used for the Table Sink? -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org