>
> It is definitely required according to my understanding, and to how the
> C++ implementation works.  The validation functions in the C++
> implementation also check for this (if a child buffer is too small for
> the number of values advertised by the parent, it is an error).

+1.

I think the wording is confusing.   "While a struct does not have physical
storage for each of its semantic slots" refers to the fact that all fields
in the struct are stored in separate child arrays and not as buffers on the
Struct array itself.  The actual value used in the child Array isn't
important i the struct is null but it must be appended so the length of the
struct is equal to the length of all of its children.

-Micah

On Fri, Feb 18, 2022 at 10:39 AM Antoine Pitrou <anto...@python.org> wrote:

>
> Le 18/02/2022 à 19:29, Phillip Cloud a écrit :
> >
> > The description underneath the example says:
> >
> >> While a struct does not have physical storage for each of its semantic
> > slots
> >> (i.e. each scalar C-like struct), an entire struct slot can be set to
> > null via the validity bitmap.
> >
> > To me this suggests that appending a sentinel value to the values buffer
> > for a field is allowed,
> > but not required.
> >
> > Am I understanding this correctly?
>
> It is definitely required according to my understanding, and to how the
> C++ implementation works.  The validation functions in the C++
> implementation also check for this (if a child buffer is too small for
> the number of values advertised by the parent, it is an error).
>
> Regards
>
> Antoine.
>

Reply via email to