appletreeisyellow commented on code in PR #9223:
URL: https://github.com/apache/arrow-datafusion/pull/9223#discussion_r1528942393


##########
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:
   Yeah, I was also confused by the comment I wrote a month ago 🙈
   
   I rephrased comments in 
https://github.com/apache/arrow-datafusion/pull/9223/commits/275ddc6ea1e30c9e453d9f4c3fece57b835dab1f



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