adriangb commented on code in PR #23844:
URL: https://github.com/apache/datafusion/pull/23844#discussion_r3640993613


##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -1537,6 +1543,25 @@ fn replace_with_null(
     Ok(with_null)
 }
 
+/// Returns the innermost [`PhysicalExpr`] that is provably null if `expr` is 
null.
+///
+/// Keep this in sync with the logical-plan equivalent, 
`unwrap_certainly_null_expr`
+/// in `datafusion/expr/src/expr_schema.rs`. If the two disagree on which 
wrappers
+/// are null-preserving, `CASE` nullability computed by the logical and 
physical
+/// planners can diverge and cause a schema mismatch during planning (the bug 
this
+/// PR fixes).

Review Comment:
   ```suggestion
   /// planners can diverge and cause a schema mismatch during planning.
   /// See https://github.com/apache/datafusion/pull/23844 for rationale.
   ```



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