Is your feature request related to a problem or challenge? Please describe what you are trying to do.
#3749 added a new NullBuffer abstraction, as part of #1176 it is necessary to switch ArrayData over to using it.
A complicating factor is that ArrayData::offset currently applies to both the values and the null buffer, this leads to two options:
- Continue to provide
ArrayData::null_buffer returning the underlying Buffer relying on clients to apply the offset
- Change the return type of
ArrayData::null_buffer to NullBuffer breaking downstreams
Describe the solution you'd like
Option 2. puts us in a better place for #1176 as it leaves the offset as just applying to the array values, allowing for the null buffer to have a different offset. It also leads to a better API for users.
Describe alternatives you've considered
Additional context