Skip to content

fix(parquet_writer): correctly update upper bound #1520

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

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Jul 17, 2025

Which issue does this PR close?

It fixes issue with not correct upper bound in case of multiple row groups in parquet file.

Closes #1519

What changes are included in this PR?

  • change > to < for updating upper bound
  • adjust test to write multiple row groups per file

Are these changes tested?

I've changed a test so that this code path is activated.

@Erigara Erigara force-pushed the fix/update_stat_max branch 3 times, most recently from 57ed320 to 0b1b8a4 Compare July 17, 2025 07:53
@@ -266,7 +266,7 @@ impl MinMaxColAggregator {
self.upper_bounds
.entry(field_id)
.and_modify(|e| {
if *e > datum {
if *e < datum {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch! can we also add an unit test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will look into it, now it's tested as part of test_parquet_writer

Copy link
Contributor Author

@Erigara Erigara Jul 28, 2025

Choose a reason for hiding this comment

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

@CTTY sorry for the delay i've added test_min_max_aggregator test

@Erigara Erigara force-pushed the fix/update_stat_max branch 2 times, most recently from 8b6a3c6 to 98c8c82 Compare July 28, 2025 16:23
Copy link
Contributor

@CTTY CTTY left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@Erigara Erigara force-pushed the fix/update_stat_max branch from 98c8c82 to 7eb2721 Compare July 28, 2025 21:33
Copy link
Contributor

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks @Erigara for this pr, LGTM!

@liurenjie1024 liurenjie1024 merged commit 2d7bae9 into apache:main Jul 29, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(parquet_writer): incorrect upper bound in data file
3 participants