aokolnychyi commented on code in PR #6919:
URL: https://github.com/apache/iceberg/pull/6919#discussion_r1144217379
##########
api/src/main/java/org/apache/iceberg/Scan.java:
##########
@@ -171,4 +172,7 @@ default ThisT select(String... columns) {
/** Returns the split open file cost for this scan. */
long splitOpenFileCost();
+
+ /** Create a new scan that will report the scan metrics to the {@code
reporter} */
+ ThisT withMetricsReporter(Collection<MetricsReporter> reporter);
Review Comment:
I don't think we use `with` prefixes throughout the `Scan` API. Also, we
should accept a single reporter rather than a collection given the method name.
Under the hood, it would be a list and we should be able to call this method
more than once to add different reporters.
```
scan
.filter(cold)
.metricsReporter(reporter1)
.metricsReporter(reporter2)
.planFiles()
```
We may add a new method that accepts an iterable in the future if we have a
use case for it.
--
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]