-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-34106: [C++][Parquet] Fix updating page stats for WriteArrowDictionary #34107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
|
Converted to draft because I hit another issue: #14870. The C++ parquet reader does not parse column statistics correctly here: https://github.com/apache/arrow/blob/master/cpp/src/parquet/column_reader.cc#L214 // Extracts encoded statistics from V1 and V2 data page headers
template <typename H>
EncodedStatistics ExtractStatsFromHeader(const H& header) {
EncodedStatistics page_statistics;
if (!header.__isset.statistics) {
return page_statistics;
}
const format::Statistics& stats = header.statistics;
if (stats.__isset.max) {
page_statistics.set_max(stats.max);
}
if (stats.__isset.min) {
page_statistics.set_min(stats.min);
}
if (stats.__isset.null_count) {
page_statistics.set_null_count(stats.null_count);
}
if (stats.__isset.distinct_count) {
page_statistics.set_distinct_count(stats.distinct_count);
}
return page_statistics;
}
Once #34112 is merged, the test failure here will be recovered. |
09de262 to
af1318e
Compare
|
@westonpace @wjones127 Please take a look. Thanks! |
wjones127
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
|
Gentle ping @wjones127 |
|
Benchmark runs are scheduled for baseline = 6850923 and contender = 476eb2e. 476eb2e is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Rationale for this change
ColumnWriter::WriteArrowDictionaryhas tried to update stats but has problem if a single write has been split into batches and more than one page is written.What changes are included in this PR?
Make sure every write of batch has updated the stats.
Are these changes tested?
Add test case which fails without the fix.
Are there any user-facing changes?
No.