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-2988: Supports disabling statistics for specific columns #2989

Merged
merged 5 commits into from
Aug 28, 2024

Conversation

ConeyLiu
Copy link
Contributor

Rationale for this change

Closes #2988

What changes are included in this PR?

Supports config

Are these changes tested?

New UTs.

Supports disabling statistics for specific columns by configuration.

Are there any user-facing changes?

The existing code does not need changes.

Closes #2988

this.sizeStatisticsBuilder = SizeStatistics.newBuilder(
path.getPrimitiveType(), path.getMaxRepetitionLevel(), path.getMaxDefinitionLevel());
}

void writeNull(int repetitionLevel, int definitionLevel) {
statistics.incrementNumNulls();
if (statistics != null) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we create a NoopStatistics so we don't need to this check? The point of ColumnValueCollector class is to avoid any condition as it is in the critical path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to NoopStatistics

Copy link
Member

@wgtmac wgtmac 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!

@wgtmac wgtmac merged commit 3b5fb4b into apache:master Aug 28, 2024
9 checks passed
@wgtmac wgtmac added this to the 1.15.0 milestone Sep 30, 2024
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.

Supports disable statistics for specified columns
2 participants