manuzhang commented on code in PR #15104:
URL: https://github.com/apache/iceberg/pull/15104#discussion_r2732838567
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java:
##########
@@ -135,6 +140,11 @@ abstract class SparkWrite implements Write,
RequiresDistributionAndOrdering {
this.writeRequirements = writeRequirements;
this.outputSpecId = writeConf.outputSpecId();
this.writeProperties = writeConf.writeProperties();
+
+ if (this.table instanceof BaseTable) {
+ this.metricsReporter = new InMemoryMetricsReporter();
+ ((BaseTable) this.table).combineMetricsReporter(metricsReporter);
Review Comment:
`SparkScanBuilder` eventually delegate to Iceberg's `Scan` interface which
has interface to pass down metrics reporter. We use Spark's write interfaces
for the write path and lack the counterpart for metrics reporter.
--
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]