You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2025/06/20 22:54:19 UTC

[PR] fix: Do not add null buffer for `NullArray` [arrow-rs]

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

   # 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.
   
   Closes #7725.
   
   # 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.
   
   Do not populate null buffers when building `MutableArrayData`
   
   # 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 call them out.
   


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


Re: [PR] fix: Do not add null buffer for `NullArray` in MutableArrayData [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #7726:
URL: https://github.com/apache/arrow-rs/pull/7726


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


Re: [PR] fix: Do not add null buffer for `NullArray` [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7726:
URL: https://github.com/apache/arrow-rs/pull/7726#discussion_r2160318478


##########
arrow-array/src/array/null_array.rs:
##########
@@ -201,4 +204,32 @@ mod tests {
         let array = NullArray::new(1024 * 1024);
         assert_eq!(format!("{array:?}"), "NullArray(1048576)");
     }
+
+    #[test]
+    fn test_null_array_with_parent_null_buffer() {

Review Comment:
   I verified that this PR fails without the code change in this PR
   
   ```
   
   NullArray data should not contain a null buffer, as no buffers are required
   thread 'array::null_array::tests::test_null_array_with_parent_null_buffer' panicked at arrow-array/src/array/null_array.rs:149:9:
   NullArray data should not contain a null buffer, as no buffers are required
   ```



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


Re: [PR] fix: Do not add null buffer for `NullArray` [arrow-rs]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #7726:
URL: https://github.com/apache/arrow-rs/pull/7726#issuecomment-2993684451

   > Thank you @comphead -- i think we should add a test for this
   > 
   > i tried to make some tests in `take` as that uses mutable array data (
   > 
   > https://github.com/apache/arrow-rs/blob/f92ff183aad326b1a818f6495215f60b27d9ad4b/arrow-select/src/take.rs#L2057-L2066
   > 
   > I asserted that the output array had no nulls
   > 
   > However, that test passes without this change so I probably don't understand the case that can cause the problem
   
   Thanks @alamb I'm adding the test


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