alamb commented on code in PR #5485:
URL: https://github.com/apache/arrow-datafusion/pull/5485#discussion_r1128594945


##########
datafusion/core/src/physical_optimizer/aggregate_statistics.rs:
##########
@@ -189,10 +189,9 @@ fn take_optimizable_column_count(
                     ..
                 } = &col_stats[col_expr.index()]
                 {
-                    let expr = format!("COUNT({})", col_expr.name());
                     return Some((
                         ScalarValue::Int64(Some((num_rows - val) as i64)),
-                        expr,
+                        casted_expr.name().to_string(),

Review Comment:
   I wonder if we could use 
https://docs.rs/datafusion/19.0.0/datafusion/prelude/enum.Expr.html#method.display_name
 instead of `name` here (which might also resolve any discrepancies) 🤔 



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

Reply via email to