martin-g commented on code in PR #21762:
URL: https://github.com/apache/datafusion/pull/21762#discussion_r3123348047
##########
datafusion/physical-expr-common/src/metrics/mod.rs:
##########
@@ -432,6 +438,15 @@ impl Display for MetricsSet {
}
}
+impl IntoIterator for MetricsSet {
Review Comment:
I see!
This is a good point!
Now I think it would be better to add `extend()` with `impl Extend for
MetricsSet`. This will give you `extend_one()` and `extend_reserve()` for free.
Could you please check whether `for m in &metrics_set {...}` works ? If not
then I'd suggest to rework/remove the existing `iter()` method with `impl
IntoIterator for &MetricsSet`.
Also please add few unit tests for extend() and collect().
--
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]