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


##########
core/src/main/java/org/apache/iceberg/BaseTableScan.java:
##########
@@ -116,9 +133,20 @@ public CloseableIterable<FileScanTask> planFiles() {
           ExpressionUtil.toSanitizedString(filter()));
 
       Listeners.notifyAll(new ScanEvent(table().name(), snapshot.snapshotId(), 
filter(), schema()));
-
-      return doPlanFiles();
-
+      scanReporter().startScan();
+      Timer.Sample sample = 
scanReporter().scanMetrics().totalScanDuration().start();

Review Comment:
   I double-checked and the old implementation was behaving correctly, because 
a new `ScanMetrics` instance was created when `ScanReporter#startScan()` was 
called.
   However, I updated the `ScanReporter` implementation to how you suggested, 
as that is cleaner



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