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

gabotechs pushed a commit to branch fix-custom-metric-display
in repository https://gitbox.apache.org/repos/asf/datafusion.git

commit 301daa02226f413990ace4a72cb6e9f1bb168ff1
Author: Gabriel Musat Mestre <[email protected]>
AuthorDate: Mon Mar 2 11:08:59 2026 +0100

    Fix custom metric display
---
 datafusion/physical-expr-common/src/metrics/value.rs | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/datafusion/physical-expr-common/src/metrics/value.rs 
b/datafusion/physical-expr-common/src/metrics/value.rs
index 26f68980ba..d9e93aa361 100644
--- a/datafusion/physical-expr-common/src/metrics/value.rs
+++ b/datafusion/physical-expr-common/src/metrics/value.rs
@@ -1050,8 +1050,8 @@ impl Display for MetricValue {
                 write!(f, "{pruning_metrics}")
             }
             Self::Ratio { ratio_metrics, .. } => write!(f, "{ratio_metrics}"),
-            Self::Custom { name, value } => {
-                write!(f, "name:{name} {value}")
+            Self::Custom { value, .. } => {
+                write!(f, "{value}")
             }
         }
     }
@@ -1146,6 +1146,12 @@ mod tests {
         }
     }
 
+    #[test]
+    fn test_display_custom_metric() {
+        let custom_val = new_custom_counter("hi", 11);
+        assert_eq!(custom_val.to_string(), "count: 11");
+    }
+
     #[test]
     fn test_display_output_rows() {
         let count = Count::new();


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

Reply via email to