viirya commented on code in PR #9223:
URL: https://github.com/apache/arrow-datafusion/pull/9223#discussion_r1527203613
##########
datafusion/core/src/physical_optimizer/pruning.rs:
##########
@@ -903,6 +1004,42 @@ impl<'a> PruningExpressionBuilder<'a> {
self.required_columns
.max_column_expr(&self.column, &self.column_expr, self.field)
}
+
+ /// Note that this function intentionally overwrites the column expression
to [`phys_expr::Column`].
+ /// i.e. expressions like [`phys_expr::CastExpr`] or
[`phys_expr::TryCastExpr`] will be overwritten.
+ ///
+ /// This is to avoid cases like `cast(x_null_count)` or
`try_cast(x_null_count)`.
Review Comment:
I feel that the current comment is confused. It is better to rephrase it a
bit.
--
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]