nastra commented on code in PR #7447:
URL: https://github.com/apache/iceberg/pull/7447#discussion_r1180427666


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkBatchQueryScan.java:
##########
@@ -256,4 +268,23 @@ public String toString() {
         runtimeFilterExpressions,
         caseSensitive());
   }
+
+  @Override
+  public CustomTaskMetric[] reportDriverMetrics() {
+    List<CustomTaskMetric> customTaskMetrics = Lists.newArrayList();
+    MetricsReport metricsReport = sparkReadMetricReporter.getMetricsReport();
+    ScanReport scanReport = (ScanReport) metricsReport;

Review Comment:
   rather than casting here I think what would be better is to provide the 
necessary type of metrics report in the `SparkReadMetricsReporter`? This is 
because `report(..)` doesn't guarantee that you will only get a `ScanReport`



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