Wouldn't this create an undefined state when determining whether an index
is valid or not?
https://github.com/apache/arrow/blob/8d76312dd397ebe07b71531f6d23b8caa76703dc/cpp/src/arrow/array/array_base.h#L58

On Thu, Dec 17, 2020 at 12:28 PM Antoine Pitrou <anto...@python.org> wrote:

>
> This doesn't seem to be very useful. Also, multiplying special cases
> makes maintenance more difficult and code generally more fragile.
>
> Regards
>
> Antoine.
>
>
> Le 17/12/2020 à 18:16, Niranda Perera a écrit :
> > yes! a buffer with size 0. I forgot to mention that the rest of the
> buffers
> > in array_data have a non-zero size.
> >
> > On Thu, Dec 17, 2020 at 12:12 PM Antoine Pitrou <anto...@python.org>
> wrote:
> >
> >>
> >> What is an "empty buffer" here? A buffer with size 0?
> >>
> >>
> >> Le 17/12/2020 à 18:02, Niranda Perera a écrit :
> >>> Hi all,
> >>>
> >>> I am wondering if we need to consider the case of an empty buffer for
> >>> ArrayData validity buffer.
> >>> What happens when we create an ArrayData structure with buffers[0] =
> >>> empty_buffer and null_count= -1?
> >>> Shouldn't this infer null_count as 0 from this method?
> >>>
> >>
> https://github.com/apache/arrow/blob/6c3547347e9d95f7d0c77d5949cb8fcf6983ca9b/cpp/src/arrow/array/data.cc#L50
> >>>
> >>
> >
> >
>


-- 
Niranda Perera
@n1r44 <https://twitter.com/N1R44>
+1 812 558 8884 / +94 71 554 8430
https://www.linkedin.com/in/niranda

Reply via email to