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/07/12 21:25:57 UTC

[GitHub] [arrow-rs] jhorstmann opened a new pull request, #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   # 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 #2055.
   
   # Rationale for this change
   
   
    
   # 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?
   
   No


-- 
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] codecov-commenter commented on pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2056:
URL: https://github.com/apache/arrow-rs/pull/2056#issuecomment-1182528686

   # [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/2056?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2056](https://codecov.io/gh/apache/arrow-rs/pull/2056?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (517d693) into [master](https://codecov.io/gh/apache/arrow-rs/commit/330505c98c9db4d103b4965e8bd55065961dada7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (330505c) will **increase** coverage by `0.01%`.
   > The diff coverage is `95.91%`.
   
   > :exclamation: Current head 517d693 differs from pull request most recent head 58f3aee. Consider uploading reports for the commit 58f3aee to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2056      +/-   ##
   ==========================================
   + Coverage   83.55%   83.57%   +0.01%     
   ==========================================
     Files         222      222              
     Lines       58230    58244      +14     
   ==========================================
   + Hits        48656    48679      +23     
   + Misses       9574     9565       -9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/2056?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [arrow/src/ffi.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2ZmaS5ycw==) | `87.52% <72.72%> (+0.34%)` | :arrow_up: |
   | [arrow/src/datatypes/ffi.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2RhdGF0eXBlcy9mZmkucnM=) | `76.56% <92.85%> (+3.83%)` | :arrow_up: |
   | [arrow/src/array/array\_boolean.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L2FycmF5X2Jvb2xlYW4ucnM=) | `94.15% <100.00%> (+0.77%)` | :arrow_up: |
   | [arrow/src/array/builder/generic\_binary\_builder.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L2J1aWxkZXIvZ2VuZXJpY19iaW5hcnlfYnVpbGRlci5ycw==) | `83.78% <100.00%> (+26.64%)` | :arrow_up: |
   | [arrow/src/array/builder/generic\_list\_builder.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L2J1aWxkZXIvZ2VuZXJpY19saXN0X2J1aWxkZXIucnM=) | `95.09% <100.00%> (-1.61%)` | :arrow_down: |
   | [arrow/src/array/builder/generic\_string\_builder.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L2J1aWxkZXIvZ2VuZXJpY19zdHJpbmdfYnVpbGRlci5ycw==) | `92.13% <100.00%> (+10.08%)` | :arrow_up: |
   | [...row/src/array/builder/string\_dictionary\_builder.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L2J1aWxkZXIvc3RyaW5nX2RpY3Rpb25hcnlfYnVpbGRlci5ycw==) | `90.64% <0.00%> (-0.72%)` | :arrow_down: |
   | [arrow/src/datatypes/datatype.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2RhdGF0eXBlcy9kYXRhdHlwZS5ycw==) | `65.31% <0.00%> (-0.37%)` | :arrow_down: |
   | [parquet\_derive/src/parquet\_field.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldF9kZXJpdmUvc3JjL3BhcnF1ZXRfZmllbGQucnM=) | `65.98% <0.00%> (-0.23%)` | :arrow_down: |
   | [arrow/src/array/equal/mod.rs](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L2VxdWFsL21vZC5ycw==) | `96.48% <0.00%> (+0.28%)` | :arrow_up: |
   | ... and [3 more](https://codecov.io/gh/apache/arrow-rs/pull/2056/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/2056?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/2056?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [330505c...58f3aee](https://codecov.io/gh/apache/arrow-rs/pull/2056?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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] HaoYang670 commented on pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   > > Why don't we use the `BooleanBuilder` directly?
   > 
   > We would probably need to do some optimizations on the builders to get similar performance.
   
   Do you mean that the Boolean builder is slower than this implementation?


-- 
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 #2056: Avoid creating null buffer for BooleanArray if null count is zero

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


##########
arrow/src/array/array_boolean.rs:
##########
@@ -242,14 +242,19 @@ impl<Ptr: Borrow<Option<bool>>> FromIterator<Ptr> for BooleanArray {
             }
         });
 
+        let null_buf: Buffer = null_builder.into();

Review Comment:
   I wonder if we could push this optimisation into ArrayData::new_unchecked??



-- 
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] jhorstmann commented on pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   > Why don't we use the `BooleanBuilder` directly?
   
   From a correctness perspective that would probably be better and would also solve the reliance on `size_hint` (#138). We would probably need to do some optimizations on the builders to get similar performance.


-- 
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] ursabot commented on pull request #2056: Ignore null buffer when creating ArrayData if null count is zero

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

   Benchmark runs are scheduled for baseline = efd3152f85f182757138dd5984c9832c3257448c and contender = b2cf02c7a8a5027d037fc359323bc0ed45b943de. b2cf02c7a8a5027d037fc359323bc0ed45b943de is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/50fee619e77d49a8a381f60ee5e8c07a...5e0df3aa18b54c049503e5eaf2640695/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/656025ff01dc40b1b04e2ef9077e7b3a...7e584eff8de34d1ea516215bbea113e0/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/744f318ad65e4cc2969496a08c9f0c31...5d08ab4055d649009c57f3cba8acfa37/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/c4b1eb22f50c48e680d863f372465a1f...b932e1cf40a24a47968459e362b58b2d/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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 merged pull request #2056: Ignore null buffer when creating ArrayData if null count is zero

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #2056:
URL: https://github.com/apache/arrow-rs/pull/2056


-- 
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] alamb commented on pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   Not sure what happened with the windows builder, but I have restarted it


-- 
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] jhorstmann commented on pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   #2038 looks like the more extensive and correct solution. I'll take a look at the performance results for that PR.


-- 
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] heyrutvik commented on pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   @jhorstmann FYI, see https://github.com/apache/arrow-rs/pull/2038#issuecomment-1181960914 for some discussion about performance of the PR (and subsequent comments). I tried original value for buffer size for some builders but not seeing much difference.


-- 
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 #2056: Avoid creating null buffer for BooleanArray if null count is zero

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

   FWIW #2038 by @heyrutvik will overlap with this. This isn't a problem, just an FYI


-- 
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] jhorstmann commented on a diff in pull request #2056: Avoid creating null buffer for BooleanArray if null count is zero

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


##########
arrow/src/array/array_boolean.rs:
##########
@@ -242,14 +242,19 @@ impl<Ptr: Borrow<Option<bool>>> FromIterator<Ptr> for BooleanArray {
             }
         });
 
+        let null_buf: Buffer = null_builder.into();

Review Comment:
   That's an interesting idea and it passes all the existing test cases. It also changes behavior when someone passes an explicit null buffer, but I can't think of a reason why people would rely on that.



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