manuzhang commented on code in PR #18709:
URL: https://github.com/apache/iceberg/pull/18709#discussion_r4520522590
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkScan.java:
##########
@@ -301,13 +305,14 @@ public String toString() {
@Override
public CustomTaskMetric[] reportDriverMetrics() {
ScanReport scanReport = scanReportSupplier != null ?
scanReportSupplier.get() : null;
+ List<CustomTaskMetric> driverMetrics = Lists.newArrayList();
+
+ driverMetrics.add(new
TaskEffectiveSplitTargetSize(effectiveSplitTargetSize));
if (scanReport == null) {
- return new CustomTaskMetric[0];
+ return driverMetrics.toArray(new CustomTaskMetric[0]);
Review Comment:
This now duplicates the return at the end. We can return at last with
wrapping metrics in `if (scanReport != null)`.
--
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]