Describe the bug
Calling arrow_select filter over a struct array with no fields always returns an array of length zero.
To Reproduce
As above.
Expected behavior
Length should be equal to true-count of the mask.
Additional context
This is yet another example of bugs caused from struct array defaulting length to zero. I strongly think we should change these APIs and absorb the disruption.
This function call is incorrect and should pass the length as true-count:
|
|
|
Ok(unsafe { StructArray::new_unchecked(array.fields().clone(), columns, nulls) }) |
|
} |