You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2024/04/05 14:35:10 UTC
[I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
pitrou opened a new issue, #41032:
URL: https://github.com/apache/arrow/issues/41032
### Describe the bug, including details regarding any error messages, version, and platform.
While looking through another PR, I noticed that we recently [introduced](https://github.com/apache/arrow/pull/40876) a bug in `PlainBooleanDecoder::DecodeArrow`.
Apparently the tests are not thorough enough to detect the issue.
A possible fix is the following patch:
```diff
diff --git a/cpp/src/parquet/encoding.cc b/cpp/src/parquet/encoding.cc
index 6e93b49339..a6e60aa012 100644
--- a/cpp/src/parquet/encoding.cc
+++ b/cpp/src/parquet/encoding.cc
@@ -1208,7 +1208,7 @@ int PlainBooleanDecoder::DecodeArrow(
BitBlockCounter bit_counter(valid_bits, valid_bits_offset, num_values);
int64_t value_position = 0;
int64_t valid_bits_offset_position = valid_bits_offset;
- int64_t previous_value_offset = 0;
+ int64_t previous_value_offset = total_num_values_ - num_values_;
while (value_position < num_values) {
auto block = bit_counter.NextWord();
if (block.AllSet()) {
@@ -1224,8 +1224,7 @@ int PlainBooleanDecoder::DecodeArrow(
} else {
for (int64_t i = 0; i < block.length; ++i) {
if (bit_util::GetBit(valid_bits, valid_bits_offset_position + i)) {
- bool value = bit_util::GetBit(
- data_, total_num_values_ - num_values_ + previous_value_offset);
+ bool value = bit_util::GetBit(data_, previous_value_offset);
builder->UnsafeAppend(value);
previous_value_offset += 1;
} else {
```
### Component(s)
C++, Parquet
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #41032:
URL: https://github.com/apache/arrow/issues/41032#issuecomment-2039984058
take
--
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: [I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #41032:
URL: https://github.com/apache/arrow/issues/41032#issuecomment-2039970540
I'd like quickly fixing 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
Re: [I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #41032:
URL: https://github.com/apache/arrow/issues/41032#issuecomment-2040059763
I've re-produce the bug using tests, will send a fixing with testing tonight
--
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: [I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #41032:
URL: https://github.com/apache/arrow/issues/41032#issuecomment-2042872883
Issue resolved by pull request 41037
https://github.com/apache/arrow/pull/41037
--
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: [I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #41032:
URL: https://github.com/apache/arrow/issues/41032#issuecomment-2039962418
We should either fix this quickly for 16.0.0, or revert https://github.com/apache/arrow/pull/40876 . @mapleFU @raulcd
--
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: [I] [C++] Regression in PlainBooleanDecoder::DecodeArrow [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #41032: [C++] Regression in PlainBooleanDecoder::DecodeArrow
URL: https://github.com/apache/arrow/issues/41032
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org