BooleanArray::from_iter
should omit validity buffer if all values are valid
#2055
Labels
arrow
Changes to the arrow crate
enhancement
Any new improvement worthy of a entry in the changelog
performance
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Similar to #1856,
BooleanArray::from_iter
currently always initializes and returns a null_buffer, even when all values are valid.Describe the solution you'd like
Before constructing the ArrayData we could check the count of ones in the validity buffer and mapping it to None if all values are valid. This should not add any overhead as the number of nulls is counted anyway by the ArrayData constructor.
The text was updated successfully, but these errors were encountered: