You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jiangzhx (via GitHub)" <gi...@apache.org> on 2023/03/08 03:34:12 UTC

[GitHub] [arrow-datafusion] jiangzhx commented on a diff in pull request #5485: AggregateStatistics min/max/count take_optimizable replace col_expr name with casted_expr name

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


##########
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:
   sorry,i did not get a point.
   
   [display_name](https://docs.rs/datafusion/19.0.0/datafusion/prelude/enum.Expr.html#method.display_name) method was define at  Expr::Column(Column) , The Column type is datafusion_common::Column
   
   but casted_expr type is datafusion::physical_plan::expressions::Column, there is not a method call display_name



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org