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


##########
data/src/main/java/org/apache/iceberg/data/GenericAppenderFactory.java:
##########
@@ -129,7 +129,7 @@ public FileAppender<Record> newAppender(OutputFile 
outputFile, FileFormat fileFo
   public FileAppender<Record> newAppender(
       EncryptedOutputFile encryptedOutputFile, FileFormat fileFormat) {
     MetricsConfig metricsConfig =
-        table != null ? MetricsConfig.forTable(table) : 
MetricsConfig.fromProperties(config);
+        table != null ? MetricsConfig.forTable(table) : 
MetricsConfig.getDefault();

Review Comment:
   If we accept that the `config` is not considered anymore, then we can double 
check the `validateMetricsConfig` logic and simplify it too. We went to extra 
length to only do validation if the `table` is not set.
   
   Maybe first we just throw an exception if the `write.metadata.metrics.` is 
set in the `config`?



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