fn nullability_compatible(expected_field: &Field, actual_field: &Field) -> boolExpand description
Returns true when the remote field’s nullability fits the expected field.
The remote physical optimizer may narrow a nullable column to non-nullable,
as DataFusion’s own schema invariant permits: AggregateStatistics
replaces an aggregate over an empty region with a non-null literal. Batches
are rebuilt with the expected schema, so the narrowing does not leak.
Widening is rejected. Nested field nullability is part of the data type and
still has to match exactly.