You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/12/07 06:36:55 UTC

[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8850: ARROW-10591: [Rust] Add support for StructArray to MutableArrayData

jorgecarleitao commented on a change in pull request #8850:
URL: https://github.com/apache/arrow/pull/8850#discussion_r537263258



##########
File path: rust/arrow/src/array/transform/mod.rs
##########
@@ -285,10 +288,16 @@ impl<'a> MutableArrayData<'a> {
     /// `use_nulls` is a flag used to optimize insertions. It should be `false` if the only source of nulls
     /// are the arrays themselves and `true` if the user plans to call [MutableArrayData::extend_nulls].
     /// In other words, if `use_nulls` is `false`, calling [MutableArrayData::extend_nulls] should not be used.
-    pub fn new(arrays: Vec<&'a ArrayData>, use_nulls: bool, capacity: usize) -> Self {
+    pub fn new(arrays: Vec<&'a ArrayData>, mut use_nulls: bool, capacity: usize) -> Self {
         let data_type = arrays[0].data_type();
         use crate::datatypes::*;
 
+        // if any of the arrays has nulls, insertions from any array requires setting bits

Review comment:
       This change is unrelated to this PR: it was a commit from a bug fix, that this PR was build on top of. It is required also for non-struct arrays :)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org