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 2021/10/06 14:36:44 UTC
[GitHub] [arrow-rs] alamb opened a new pull request #816: Fix null count when casting ListArray
alamb opened a new pull request #816:
URL: https://github.com/apache/arrow-rs/pull/816
# Which issue does this PR close?
Closes https://github.com/apache/arrow-rs/issues/815
# Rationale for this change
The null count of the output of `cast` is incorrect for ListArrays
# What changes are included in this PR?
Fix null calculation
# Are there any user-facing changes?
Bug fixed
--
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 a change in pull request #816: Fix null count when casting ListArray
Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #816:
URL: https://github.com/apache/arrow-rs/pull/816#discussion_r723348294
##########
File path: arrow/src/compute/kernels/cast.rs
##########
@@ -1680,12 +1680,8 @@ fn cast_list_inner<OffsetSize: OffsetSizeTrait>(
let array_data = ArrayData::new(
to_type.clone(),
array.len(),
- Some(cast_array.null_count()),
- cast_array
- .data()
- .null_bitmap()
- .clone()
- .map(|bitmap| bitmap.bits),
+ Some(data.null_count()),
Review comment:
This is also consistent with arrow2: https://github.com/jorgecarleitao/arrow2/blob/a15044a1bc0c079c40520ad5e91b240998b3ee0a/src/compute/cast/mod.rs#L282
FWIW
##########
File path: arrow/src/compute/kernels/cast.rs
##########
@@ -1680,12 +1680,8 @@ fn cast_list_inner<OffsetSize: OffsetSizeTrait>(
let array_data = ArrayData::new(
to_type.clone(),
array.len(),
- Some(cast_array.null_count()),
- cast_array
- .data()
- .null_bitmap()
- .clone()
- .map(|bitmap| bitmap.bits),
+ Some(data.null_count()),
Review comment:
This is also consistent with arrow2: https://github.com/jorgecarleitao/arrow2/blob/a15044a1bc0c079c40520ad5e91b240998b3ee0a/src/compute/cast/mod.rs#L282
cc @jorgecarleitao
--
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] nevi-me merged pull request #816: Fix null count when casting ListArray
Posted by GitBox <gi...@apache.org>.
nevi-me merged pull request #816:
URL: https://github.com/apache/arrow-rs/pull/816
--
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 a change in pull request #816: Fix null count when casting ListArray
Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #816:
URL: https://github.com/apache/arrow-rs/pull/816#discussion_r723345445
##########
File path: arrow/src/compute/kernels/cast.rs
##########
@@ -1680,12 +1680,8 @@ fn cast_list_inner<OffsetSize: OffsetSizeTrait>(
let array_data = ArrayData::new(
to_type.clone(),
array.len(),
- Some(cast_array.null_count()),
- cast_array
- .data()
- .null_bitmap()
- .clone()
- .map(|bitmap| bitmap.bits),
+ Some(data.null_count()),
Review comment:
this is the fix (should use the null count from the original array rather than the values)
--
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] nevi-me merged pull request #816: Fix null count when casting ListArray
Posted by GitBox <gi...@apache.org>.
nevi-me merged pull request #816:
URL: https://github.com/apache/arrow-rs/pull/816
--
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 #816: Fix null count when casting ListArray
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #816:
URL: https://github.com/apache/arrow-rs/pull/816#issuecomment-936453402
# [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/816?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 [#816](https://codecov.io/gh/apache/arrow-rs/pull/816?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (317d50a) into [master](https://codecov.io/gh/apache/arrow-rs/commit/b9384f1a30f3dc808a91a44846f552ba8e0ed383?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b9384f1) will **decrease** coverage by `0.00%`.
> The diff coverage is `100.00%`.
> :exclamation: Current head 317d50a differs from pull request most recent head fe2c1f3. Consider uploading reports for the commit fe2c1f3 to get more accurate results
[](https://codecov.io/gh/apache/arrow-rs/pull/816?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #816 +/- ##
==========================================
- Coverage 82.54% 82.54% -0.01%
==========================================
Files 168 168
Lines 47919 47910 -9
==========================================
- Hits 39555 39546 -9
Misses 8364 8364
```
| [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/816?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/compute/kernels/cast.rs](https://codecov.io/gh/apache/arrow-rs/pull/816/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-YXJyb3cvc3JjL2NvbXB1dGUva2VybmVscy9jYXN0LnJz) | `94.60% <100.00%> (-0.03%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/816?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/816?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 [b9384f1...fe2c1f3](https://codecov.io/gh/apache/arrow-rs/pull/816?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