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/09 03:35:25 UTC

[GitHub] [arrow-rs] HaoYang670 opened a new pull request, #2034: Refine the List builder

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

   # 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.
   -->
   
   None.
   
   # Rationale for this change
   1. remove the field `GenericListBuilder::len`, as it is always equal to the bitmap length.
   2. refine the doc and test.
   3. move the test of binary builder and string builder to their own files.
   
   # 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.
   
   <!---
   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 a diff in pull request #2034: Refine the List builder

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


##########
arrow/src/array/builder/generic_list_builder.rs:
##########
@@ -136,7 +131,7 @@ where
 
         let offset_buffer = self.offsets_builder.finish();
         let null_bit_buffer = self.bitmap_builder.finish();
-        self.offsets_builder.append(self.len);
+        self.offsets_builder.append(OffsetSize::zero());

Review Comment:
   Aah makes sense, diff on phone didn't show it setting the length to 0



-- 
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 #2034: Refine the List builder

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

   # [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/2034?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 [#2034](https://codecov.io/gh/apache/arrow-rs/pull/2034?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (64f3bd6) into [master](https://codecov.io/gh/apache/arrow-rs/commit/ef02bf855720365aa592a318c4fd04f8a46c5805?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ef02bf8) will **increase** coverage by `0.10%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2034      +/-   ##
   ==========================================
   + Coverage   83.44%   83.54%   +0.10%     
   ==========================================
     Files         222      222              
     Lines       57979    58185     +206     
   ==========================================
   + Hits        48378    48610     +232     
   + Misses       9601     9575      -26     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/2034?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/array/builder/generic\_binary\_builder.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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/2034/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.06% <100.00%> (-1.64%)` | :arrow_down: |
   | [arrow/src/array/builder/generic\_string\_builder.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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: |
   | [arrow/src/array/equal\_json.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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-YXJyb3cvc3JjL2FycmF5L2VxdWFsX2pzb24ucnM=) | `87.89% <0.00%> (-1.81%)` | :arrow_down: |
   | [arrow/src/array/array\_decimal.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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-YXJyb3cvc3JjL2FycmF5L2FycmF5X2RlY2ltYWwucnM=) | `91.11% <0.00%> (-1.77%)` | :arrow_down: |
   | [arrow/src/datatypes/field.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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-YXJyb3cvc3JjL2RhdGF0eXBlcy9maWVsZC5ycw==) | `54.59% <0.00%> (-1.29%)` | :arrow_down: |
   | [parquet/src/file/properties.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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-cGFycXVldC9zcmMvZmlsZS9wcm9wZXJ0aWVzLnJz) | `95.04% <0.00%> (-0.73%)` | :arrow_down: |
   | [parquet\_derive/src/parquet\_field.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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.75% <0.00%> (-0.23%)` | :arrow_down: |
   | [parquet/src/arrow/record\_reader/mod.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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-cGFycXVldC9zcmMvYXJyb3cvcmVjb3JkX3JlYWRlci9tb2QucnM=) | `89.17% <0.00%> (-0.19%)` | :arrow_down: |
   | [arrow/src/datatypes/datatype.rs](https://codecov.io/gh/apache/arrow-rs/pull/2034/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.68% <0.00%> (-0.12%)` | :arrow_down: |
   | ... and [21 more](https://codecov.io/gh/apache/arrow-rs/pull/2034/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/2034?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/2034?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 [ef02bf8...64f3bd6](https://codecov.io/gh/apache/arrow-rs/pull/2034?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] tustvold commented on a diff in pull request #2034: Refine the List builder

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


##########
arrow/src/array/builder/generic_list_builder.rs:
##########
@@ -136,7 +131,7 @@ where
 
         let offset_buffer = self.offsets_builder.finish();
         let null_bit_buffer = self.bitmap_builder.finish();
-        self.offsets_builder.append(self.len);
+        self.offsets_builder.append(OffsetSize::zero());

Review Comment:
   ?



-- 
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 a diff in pull request #2034: Refine the List builder

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


##########
arrow/src/array/builder/generic_list_builder.rs:
##########
@@ -136,7 +131,7 @@ where
 
         let offset_buffer = self.offsets_builder.finish();
         let null_bit_buffer = self.bitmap_builder.finish();
-        self.offsets_builder.append(self.len);
+        self.offsets_builder.append(OffsetSize::zero());

Review Comment:
   Append a leading zero to the offset buffer, so that the buffer could be reused.
   I don't change this behaviour. 
   Originally, we had
   ```rust
   self.offsets_builder.append(self.len)
   ```
   where `self.len` is zero.



-- 
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 a diff in pull request #2034: Refine the List builder

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


##########
arrow/src/array/builder/generic_list_builder.rs:
##########
@@ -136,7 +131,7 @@ where
 
         let offset_buffer = self.offsets_builder.finish();
         let null_bit_buffer = self.bitmap_builder.finish();
-        self.offsets_builder.append(self.len);
+        self.offsets_builder.append(OffsetSize::zero());

Review Comment:
   Append a leading zero to the offset buffer, so that the  builder could be reused.
   I don't change this behaviour. 
   Originally, we had
   ```rust
   self.offsets_builder.append(self.len)
   ```
   where `self.len` is zero.



-- 
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 #2034: Refine the List builder

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


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