Skip to content

GH-50778: [C++][Parquet] Fix chunked level histogram accumulation - #50780

Merged
pitrou merged 1 commit into
apache:mainfrom
wecharyu:fix_update_level_hist
Aug 31, 2026
Merged

pitrou merged 1 commit into
apache:mainfrom
wecharyu:fix_update_level_hist

Conversation

@wecharyu

@wecharyu wecharyu commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

UpdateLevelHistogram incorrectly accumulated from the beginning of the input on every iteration of its max_level == 1 fast path. Inputs spanning multiple chunks therefore counted the first chunk repeatedly.

Fix #50778.

What changes are included in this PR?

  • Accumulate the current chunk using it rather than levels.begin().
  • Add a UT

Are these changes tested?

Yes, passing the new UT and existing UT.

Are there any user-facing changes?

No.

@wecharyu
wecharyu requested review from pitrou and wgtmac as code owners August 3, 2026 10:26
@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #50778 has been automatically assigned in GitHub to PR creator.

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks @wecharyu!

@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 3, 2026
@wecharyu

Copy link
Copy Markdown
Contributor Author

@wgtmac Can we merge this if no more concerns? Thanks!

@pitrou pitrou changed the title GH-50778: [C++] Fix chunked level histogram accumulation GH-50778: [C++][Parquet] Fix chunked level histogram accumulation Aug 31, 2026
@pitrou
pitrou merged commit 95beeb2 into apache:main Aug 31, 2026
66 of 68 checks passed
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Aug 31, 2026
@github-actions github-actions Bot added the awaiting committer review Awaiting committer review label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting committer review Awaiting committer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++] UpdateLevelHistogram produces incorrect histograms in fast path

3 participants