rluvaton commented on code in PR #27302:
URL: https://github.com/apache/datafusion/pull/27302#discussion_r4526733111


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -44,13 +45,36 @@ use kernels::{
 };
 
 /// Binary expression
-#[derive(Debug, Clone, Eq)]
+#[derive(Clone, Eq)]
 pub struct BinaryExpr {
     left: Arc<dyn PhysicalExpr>,
     op: Operator,
     right: Arc<dyn PhysicalExpr>,
     /// Specifies whether an error is returned on overflow or not
     fail_on_overflow: bool,
+    /// Lazily computed on first use, so walking the children is not repeated
+    /// for every batch. Children never change after construction, and every
+    /// constructor starts with an empty cache, so it never goes stale.
+    children_volatility: OnceLock<ChildrenVolatility>,

Review Comment:
   changed to `Option` and only evaluate for AND and OR



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