Repository navigation
ORC: Use MetricsConfig - #1339
Merged
Merged
Conversation
edgarRd
force-pushed
the
orc--metrics-config
branch
from
August 17, 2020 20:37
d1b81dd to
690127c
Compare
Contributor
Author
|
Friendly ping in this PR: @aokolnychyi @rdsr @rdblue Thanks! |
shardulm94
reviewed
Aug 19, 2020
shardulm94
left a comment
Contributor
There was a problem hiding this comment.
Minor comments. LGTM otherwise
|
|
||
| private static Object truncateIfNeeded(Bound bound, Type type, Object value, MetricsMode metricsMode) { | ||
| // ORC only stores min/max for String columns | ||
| if (value == null || metricsMode == MetricsModes.Full.get() || type.typeId() != Type.TypeID.STRING) { |
Contributor
There was a problem hiding this comment.
Might be better to check if the Metrics mode != Truncate, seems easier to read that way. Also we have a Precondition later to assert the same, which may be unnecessary if we make the check here.
edgarRd
force-pushed
the
orc--metrics-config
branch
from
August 20, 2020 01:02
690127c to
d43ee8b
Compare
Contributor
Author
|
Thanks for the review @shardulm94 - I've updated the PR. |
edgarRd
force-pushed
the
orc--metrics-config
branch
from
August 20, 2020 17:33
d43ee8b to
eb116fb
Compare
Contributor
Author
|
@rdsr @aokolnychyi PTAL - do you have any comments? |
shardulm94
approved these changes
Aug 24, 2020
Contributor
|
The PR looks good! Since this has been open for additional comments for a while now I am merging this. We can handle any followups in a separate PR. Thanks @edgarRd for the PR! |
Contributor
Author
|
Thanks @shardulm94 ! |
parthchandra
pushed a commit
to parthchandra/iceberg
that referenced
this pull request
Oct 22, 2025
* Apple 1.5.0.4 Release (apache#1339) * Prepare 1.5.0.5-apple release --------- Co-authored-by: Szehon Ho <[email protected]>
parthchandra
pushed a commit
to parthchandra/iceberg
that referenced
this pull request
Oct 22, 2025
Co-authored-by: Szehon Ho <[email protected]>
parthchandra
pushed a commit
to parthchandra/iceberg
that referenced
this pull request
Oct 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unlike Parquet metrics, ORC was not using
MetricsConfigto let the user configure which metrics to collect or truncate string column metrics.This PR fixes #1268 by adding
MetricsConfigsupport in ORC metrics. I've also added unit tests toTestMetrics, which runs for both Parquet and ORC, to check the differentMetricsModesand the truncation of string and binary (not supported in ORC) columns.PTAL @aokolnychyi @rdsr @shardulm94 Thanks!