AdamGS commented on code in PR #22604:
URL: https://github.com/apache/datafusion/pull/22604#discussion_r3323805776
##########
datafusion/physical-expr/src/projection.rs:
##########
@@ -661,7 +661,7 @@ impl ProjectionExprs {
for proj_expr in self.exprs.iter() {
let expr = &proj_expr.expr;
let col_stats = if let Some(col) = expr.downcast_ref::<Column>() {
- std::mem::take(&mut stats.column_statistics[col.index()])
+ column_statistics_at(&stats.column_statistics, col.index())
Review Comment:
Looking at this loop again, I think that theoretically we might have
multiple expression referencing a singe column, so in the current logic the
second one will have `unknown_stats`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]