-
Notifications
You must be signed in to change notification settings - Fork 1.7k
minor: Fix parquet pruning metrics display order #18379
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
Conversation
| Self::PruningMetrics { name, .. } => match name.as_ref() { | ||
| // The order is the same as the actual pruning order: from | ||
| // coarse-grained to fine-grained pruning levels. | ||
| "files_ranges_pruned_statistics" => 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little bit hacky 🤔 but I think this way is simpler and easy to update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a comment could help / ticket to assist others who find this code and are confused by it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, comments added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @2010YOUY01
just 1 thing, if the name is changed for example from files_ranges_pruned_statistics to files_ranges_pruned_statistics_other in project but not in value.rs will the test detect it and fail?
Yes, the UT in this PR will catch such changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @2010YOUY01 -- the metrics just keep getting better!
| Self::PruningMetrics { name, .. } => match name.as_ref() { | ||
| // The order is the same as the actual pruning order: from | ||
| // coarse-grained to fine-grained pruning levels. | ||
| "files_ranges_pruned_statistics" => 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a comment could help / ticket to assist others who find this code and are confused by it
|
Thank you both for the review! |
Which issue does this PR close?
Rationale for this change
It's better to let pruning metrics in parquet displayed in an order that is the same as the actual pruning order:
Now it's ordered alphabetically.
See #18321 (comment) for reproducing.
What changes are included in this PR?
Update the sort key API in
MetricValue, to let the parquet pruning metrics display in the expected order.Are these changes tested?
UT
Are there any user-facing changes?
No