hililiwei commented on code in PR #5967:
URL: https://github.com/apache/iceberg/pull/5967#discussion_r1043971211
##########
flink/v1.15/flink/src/main/java/org/apache/iceberg/flink/FlinkConfParser.java:
##########
@@ -21,20 +21,23 @@
import java.util.List;
import java.util.Map;
import java.util.function.Function;
+import javax.annotation.Nullable;
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.ReadableConfig;
import org.apache.iceberg.Table;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.Lists;
+import org.apache.iceberg.relocated.com.google.common.collect.Maps;
class FlinkConfParser {
private final Map<String, String> tableProperties;
private final Map<String, String> options;
private final ReadableConfig readableConfig;
- FlinkConfParser(Table table, Map<String, String> options, ReadableConfig
readableConfig) {
- this.tableProperties = table.properties();
+ FlinkConfParser(
+ @Nullable Table table, Map<String, String> options, ReadableConfig
readableConfig) {
+ this.tableProperties = table == null ? Maps.newHashMap() :
table.properties();
Review Comment:
Got it. Thx.
--
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]