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 2022/11/29 14:35:41 UTC

[GitHub] [arrow-rs] tustvold opened a new pull request, #3227: Zero out child null mask in new_null_array for StructArray

tustvold opened a new pull request, #3227:
URL: https://github.com/apache/arrow-rs/pull/3227

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #3226
   
   # Rationale for this change
    
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] tustvold commented on pull request #3227: Zero out child null mask in new_null_array for StructArray

Posted by GitBox <gi...@apache.org>.
tustvold commented on PR #3227:
URL: https://github.com/apache/arrow-rs/pull/3227#issuecomment-1330818728

   I've asked for clarification on this on the mailing list - https://lists.apache.org/thread/zocwg0gmjon48tthx63k9dh63fxgyhkc


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] tustvold closed pull request #3227: Zero out child null mask in new_null_array for StructArray

Posted by GitBox <gi...@apache.org>.
tustvold closed pull request #3227: Zero out child null mask in new_null_array for StructArray
URL: https://github.com/apache/arrow-rs/pull/3227


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3227: Zero out child null mask in new_null_array for StructArray

Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #3227:
URL: https://github.com/apache/arrow-rs/pull/3227#discussion_r1034839270


##########
arrow-array/src/array/mod.rs:
##########
@@ -702,14 +702,31 @@ pub fn new_null_array(data_type: &DataType, length: usize) -> ArrayRef {
                 ],
             )
         }),
-        DataType::Struct(fields) => {
-            let fields: Vec<_> = fields
+        d @ DataType::Struct(fields) => {
+            let child_data = fields
                 .iter()
-                .map(|field| (field.clone(), new_null_array(field.data_type(), length)))
+                .map(|field| {
+                    // Nulls are encoded in the parent StructArray instead, otherwise this

Review Comment:
   This does create an interesting problem for dictionaries, where the resulting child data is technically ill-formed now. I'm not really sure what can be done about this



-- 
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: github-unsubscribe@arrow.apache.org

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