Skip to content

Add name filter to metrics#23719

Draft
gabotechs wants to merge 1 commit into
mainfrom
gabotechs/filter-metrics-by-name
Draft

Add name filter to metrics#23719
gabotechs wants to merge 1 commit into
mainfrom
gabotechs/filter-metrics-by-name

Conversation

@gabotechs

@gabotechs gabotechs commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Precedes #23720.

While displaying a plan with metrics, allow filtering them by name, not just by category or type.

This is very useful when writing snapshot tests where only a specific metrics needs to be asserted, without other unrelated metrics polluting the snapshot assertion.

What changes are included in this PR?

While displaying metrics, allows filtering them by name

Are these changes tested?

Yes, by a new small test.

Are there any user-facing changes?

People using the metrics display API will be able to filter metrics by name.

@github-actions github-actions Bot added physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate labels Jul 20, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.78431% with 20 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@d0304b3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
datafusion/physical-plan/src/display.rs 36.66% 16 Missing and 3 partials ⚠️
datafusion/physical-expr-common/src/metrics/mod.rs 95.23% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23719   +/-   ##
=======================================
  Coverage        ?   80.69%           
=======================================
  Files           ?     1088           
  Lines           ?   367817           
  Branches        ?   367817           
=======================================
  Hits            ?   296812           
  Misses          ?    53290           
  Partials        ?    17715           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants