osipovartem commented on code in PR #26145:
URL: https://github.com/apache/datafusion/pull/26145#discussion_r4425546871
##########
datafusion/common/src/dfschema.rs:
##########
@@ -1231,6 +1231,14 @@ pub trait ExprSchema: std::fmt::Debug {
// Return the column's field
fn field_from_column(&self, col: &Column) -> Result<&FieldRef>;
+
+ /// Return the field and column nullability together.
+ ///
+ /// The default preserves custom implementations of [`Self::nullable`].
+ fn field_and_nullable(&self, col: &Column) -> Result<(&FieldRef, bool)> {
Review Comment:
DFSchema does use Field::is_nullable(). The default preserves custom
ExprSchema::nullable() overrides, which may disagree with the field or return
errors. The paired method avoids a second DFSchema lookup without changing that
contract. Added a regression for both disagreement directions in e0753c33c.
--
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]