Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix logic in to_arrow for empty list column (#16279)
An empty list column need not have empty children, it just needs to have zero length. In this case, the offsets array will have zero length, and we need to create a temporary buffer. Now that this branch runs, fix two errors in the construction of the arrow array: 1. The element type, if there are children, should be taken from the child array; 2. If the child arrays are empty, we must make an empty null array, rather than passing a null pointer as the values array, otherwise we hit a segfault inside arrow. The previous fix in #16201 correctly handled the empty children case (except for point two), but not the first case, which we do here. Since we we're previously going down this code path (child_arrays was never empty), we never hit the latent segfault from point two. Authors: - Lawrence Mitchell (https://github.com/wence-) Approvers: - David Wendt (https://github.com/davidwendt) - MithunR (https://github.com/mythrocks) URL: #16279
- Loading branch information