I also think 1 is the correct answer.
Unfortunately, in Arrow C++ we don't validate any of these currently,
though we do have a long-standing issue and PR for it:
https://github.com/apache/arrow/pull/46129
Regards
Antoine.
Le 29/01/2026 à 20:10, Raz Luvaton a écrit :
Currently there is ambiguity on what the validity buffer for non nullable
field of a nullable struct can be.
Lets take for example the following type:
```
nullable StructArray with non nullable field Int32
```
The struct validity is: valid, null, null, valid.
which of the following should be:
1. The child array (the int32 array) FORBIDDEN from having nulls at all
(i.e. in our example the validity buffer for the child must be valid,
valid, valid, valid) as the field is marked as non nullable?
2. The child array REQUIRED to have nulls at the same positions of the
struct nulls, i.e. the validity buffer for the child MUST be valid, null,
null, valid in our example?
3. The child array MAY have nulls but it is FORBIDDEN to have nulls where
the struct does not have nulls, i.e. it can't have null, null, valid, valid
but it can have valid, null, valid, valid in our example.
I would argue that 1 is the correct and expected requirement, as the field
is marked as non nullable.
The chosen behavior will be applicable for other nested types as well
Thanks, Raz Luvaton