SubhamSinghal commented on code in PR #21623:
URL: https://github.com/apache/datafusion/pull/21623#discussion_r3143595977
##########
datafusion/physical-expr-common/src/physical_expr.rs:
##########
@@ -438,6 +439,32 @@ pub trait PhysicalExpr: Any + Send + Sync + Display +
Debug + DynEq + DynHash {
fn placement(&self) -> ExpressionPlacement {
ExpressionPlacement::KeepInPlace
}
+
+ /// Returns whether this expression is guaranteed to evaluate to `NULL`
+ /// when all columns in `null_columns` are `NULL`.
+ ///
+ /// `null_columns` contains the column indices (in the input schema) that
+ /// are assumed to be `NULL`.
+ ///
+ /// - `Some(true)`: definitely evaluates to `NULL`
+ /// - `Some(false)`: definitely does NOT evaluate to `NULL`
+ /// - `None`: unknown (conservative default)
+ fn is_null(&self, _null_columns: &HashSet<usize>) -> Option<bool> {
+ None
+ }
+
+ /// Returns whether this expression is guaranteed to be not-true
+ /// (i.e., evaluates to `NULL` or `FALSE`).
+ ///
+ /// `null_columns` contains the column indices (in the input schema) that
+ /// are assumed to be `NULL`.
+ ///
+ /// - `Some(true)`: definitely evaluates to `NULL` or `FALSE`
Review Comment:
refactored.
--
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]