>> 2. For StringView and ArrayView, if the parent has `validity = false`. >> If they have `validity = true`, there offset might point to a invalid >> position
>I have no idea, but I hope not. Ben Kietzman might want to answer more >precisely here. I think, for view arrays, the offsets & lengths are indeed "unspecified". Imagine we are creating a view array programmatically from two child arrays of starts and lengths and one of those child arrays has a null in it so we propagate that and create a null view. We would set the validity bit to 0. We could probably mandate the "length == 0" if needed but I'm not sure there is anything that would make sense to require for the "offset". It would seem the simplest thing to do is allow it to be unspecified. Then the entire operation can be: * Set validity to lengths.validity & offsets.validity * Set lengths to lengths.values * Set offsets to offsets.values On Thu, Jun 29, 2023 at 6:51 AM Antoine Pitrou <anto...@python.org> wrote: > > Le 29/06/2023 à 15:16, wish maple a écrit : > > Sorry for being misleading. "valid" offset means that: > > 1. For Binary Like [1] format, and List formats [2], even if the parent > > has `validity = false`. Their offset should be well-defined. > > Yes. > > > 2. For StringView and ArrayView, if the parent has `validity = false`. > > If they have `validity = true`, there offset might point to a > invalid > > position > > I have no idea, but I hope not. Ben Kietzman might want to answer more > precisely here. > > Regards > > Antoine. >