2010YOUY01 commented on code in PR #18406:
URL: https://github.com/apache/datafusion/pull/18406#discussion_r2484065694


##########
datafusion/physical-plan/src/metrics/value.rs:
##########
@@ -430,6 +430,92 @@ impl PruningMetrics {
     }
 }
 
+/// Counters tracking ratio metrics (e.g. matched vs total)
+///
+/// The counters are thread-safe and shared across clones.
+#[derive(Debug, Clone, Default)]
+pub struct RatioMetrics {

Review Comment:
   Indeed the core logic is mostly duplicated, but I think the tradeoff is more 
lines of code for better readability, the APIs named `add_matched/add_pruned` 
for pruning are easier to understand than the APIs in the ratio metric.



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