Skip to content
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

GH-3059: Add configuration to disable size statistics #3060

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

wgtmac
Copy link
Member

@wgtmac wgtmac commented Nov 14, 2024

Rationale for this change

Now size statistics are enabled globally. We need to better control the behavior when it is not necessary.

What changes are included in this PR?

Add a new flag parquet.size.statistics.enabled to control whether to enable size statistics globally. It also supports a per-column control.

Are these changes tested?

Yes, added a test case in TestParquetWriter.java.

Are there any user-facing changes?

Yes, a new flag parquet.size.statistics.enabled has been added.

Closes #3059

@wgtmac
Copy link
Member Author

wgtmac commented Nov 15, 2024

Could you please take a look? Thanks! @gszadovszky @Fokko

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thank you @wgtmac for adding this, this looks good 👍

writer.write(group);
writer.close();

ParquetFileReader reader = ParquetFileReader.open(HadoopInputFile.fromPath(path, new Configuration()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I prefer to also use try-with-resource in the tests to give a good example :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your review! Changed it to use try-with-resource now.

@wgtmac wgtmac merged commit ccac04f into apache:master Nov 18, 2024
9 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.

Add configuration to disable size statistics
2 participants