dhruvxvaishnav commented on code in PR #10726:
URL: https://github.com/apache/arrow-rs/pull/10726#discussion_r3818810112
##########
arrow-cast/src/cast/list.rs:
##########
@@ -15,8 +15,111 @@
// specific language governing permissions and limitations
// under the License.
+use arrow_buffer::{BooleanBufferBuilder, NullBuffer};
+
use crate::cast::*;
+/// Returns a clone of `values` with parent nulls propagated to the child
elements.
+pub(crate) fn mask_fixed_size_list_values(array: &FixedSizeListArray) ->
ArrayRef {
+ let size = array.value_length() as usize;
+ if array.null_count() == 0 || size == 0 {
+ return Arc::clone(array.values());
+ }
+
+ let mut builder = BooleanBufferBuilder::new(array.values().len());
Review Comment:
Updated to use \NullBuffer::expand\ in \mask_fixed_size_list_values\. Thanks!
##########
arrow-cast/src/cast/list.rs:
##########
@@ -15,8 +15,111 @@
// specific language governing permissions and limitations
// under the License.
+use arrow_buffer::{BooleanBufferBuilder, NullBuffer};
+
use crate::cast::*;
+/// Returns a clone of `values` with parent nulls propagated to the child
elements.
+pub(crate) fn mask_fixed_size_list_values(array: &FixedSizeListArray) ->
ArrayRef {
+ let size = array.value_length() as usize;
+ if array.null_count() == 0 || size == 0 {
+ return Arc::clone(array.values());
+ }
+
+ let mut builder = BooleanBufferBuilder::new(array.values().len());
Review Comment:
Updated to use `NullBuffer::expand` in `mask_fixed_size_list_values`. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]