xudong963 commented on code in PR #18970:
URL: https://github.com/apache/datafusion/pull/18970#discussion_r2580012273


##########
datafusion/physical-expr/src/simplifier/mod.rs:
##########
@@ -56,6 +57,11 @@ impl<'a> TreeNodeRewriter for PhysicalExprSimplifier<'a> {
     type Node = Arc<dyn PhysicalExpr>;
 
     fn f_up(&mut self, node: Self::Node) -> Result<Transformed<Self::Node>> {
+        // Apply NOT expression simplification first
+        let not_expr_simplified = simplify_not_expr(&node, self.schema)?;
+        let node = not_expr_simplified.data;
+        let transformed = not_expr_simplified.transformed;
+
         // Apply unwrap cast optimization
         #[cfg(test)]
         let original_type = node.data_type(self.schema).unwrap();

Review Comment:
   done in 
https://github.com/apache/datafusion/pull/18970/commits/be077dbe30cd5a9831bafe4488d4b0bf9831f417



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

Reply via email to