This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 653caa143a doc: add `FilterExec` metrics to `user-guide/metrics.md` 
(#19043)
653caa143a is described below

commit 653caa143aa5f041e71f98ba2a7d69b09f1e26b0
Author: Yongting You <[email protected]>
AuthorDate: Wed Dec 3 10:00:00 2025 +0800

    doc: add `FilterExec` metrics to `user-guide/metrics.md` (#19043)
    
    ## Which issue does this PR close?
    
    <!--
    We generally require a GitHub issue to be filed for all bug fixes and
    enhancements and this helps us generate change logs for our releases.
    You can link an issue to this PR using the GitHub syntax. For example
    `Closes #123` indicates that this PR will close issue #123.
    -->
    
    part of https://github.com/apache/datafusion/issues/16602
    
    ## Rationale for this change
    
    <!--
    Why are you proposing this change? If this is already explained clearly
    in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand
    your changes and offer better suggestions for fixes.
    -->
    Start adding each operator's metrics to the user-guide page
    
    ## What changes are included in this PR?
    
    <!--
    There is no need to duplicate the description in the issue here but it
    is sometimes worth providing a summary of the individual changes in this
    PR.
    -->
    
    ## Are these changes tested?
    
    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code
    
    If tests are not included in your PR, please explain why (for example,
    are they covered by existing tests)?
    -->
    
    ## Are there any user-facing changes?
    
    <!--
    If there are user-facing changes then we may require documentation to be
    updated before approving the PR.
    -->
    
    <!--
    If there are any breaking changes to public APIs, please add the `api
    change` label.
    -->
    
    ---------
    
    Co-authored-by: Jeffrey Vo <[email protected]>
    Co-authored-by: Martin Grigorov <[email protected]>
---
 datafusion/physical-plan/src/filter.rs |  6 ++++--
 docs/source/user-guide/metrics.md      | 10 +++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/datafusion/physical-plan/src/filter.rs 
b/datafusion/physical-plan/src/filter.rs
index 7ea664757d..addabb5036 100644
--- a/datafusion/physical-plan/src/filter.rs
+++ b/datafusion/physical-plan/src/filter.rs
@@ -686,10 +686,12 @@ struct FilterExecStream {
 
 /// The metrics for `FilterExec`
 struct FilterExecMetrics {
-    // Common metrics for most operators
+    /// Common metrics for most operators
     baseline_metrics: BaselineMetrics,
-    // Selectivity of the filter, calculated as output_rows / input_rows
+    /// Selectivity of the filter, calculated as output_rows / input_rows
     selectivity: RatioMetrics,
+    // Remember to update `docs/source/user-guide/metrics.md` when adding new 
metrics,
+    // or modifying metrics comments
 }
 
 impl FilterExecMetrics {
diff --git a/docs/source/user-guide/metrics.md 
b/docs/source/user-guide/metrics.md
index 43bfcd2afe..7e0363f4ce 100644
--- a/docs/source/user-guide/metrics.md
+++ b/docs/source/user-guide/metrics.md
@@ -36,4 +36,12 @@ DataFusion operators expose runtime metrics so you can 
understand where time is
 
 ## Operator-specific Metrics
 
-TODO
+### FilterExec
+
+| Metric      | Description                                                    
   |
+| ----------- | 
----------------------------------------------------------------- |
+| selectivity | Selectivity of the filter, calculated as output_rows / 
input_rows |
+
+## TODO
+
+Add metrics for the remaining operators


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to