Commits


Weston Pace authored and David Li committed f47703e5237
ARROW-12677: [Python] Add a mask argument to pyarrow.StructArray.from_arrays This allows the user to supply an optional `mask` when creating a struct array. * The mask requirements are pretty strict (must be a boolean arrow array without nulls) compared with some of the other functions (e.g. `array.mask` accepts a wide variety of inputs). I think this should be ok since this use case is probably rarer and there are other plenty of existing ways to convert other datatypes to an arrow array. * ~~Unfortunately, StructArray::Make interprets the "null buffer" as more of a validity buffer (1 = valid, 0 = null). This is the opposite of everywhere else a `mask` is used. I was torn between inverting the input buffer to mimic the python API and passing through directly to the C interface for simplicity. I chose the simpler option but could be convinced otherwise.~~ Per request, I now invert the mask to align with the python API. Closes #10272 from westonpace/feature/ARROW-12677--python-add-a-mask-argument-to-pyarrow-structarra Authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: David Li <li.davidm96@gmail.com>