-
Notifications
You must be signed in to change notification settings - Fork 4.1k
GH-50156: [C++][Parquet] Ignore min/max for unknown column order #50157
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
1037b86
72a4ffb
3888b2f
af4a4bc
ef0b430
c73c0a3
42b47cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,12 @@ namespace parquet { | |
|
|
||
| namespace { | ||
|
|
||
| bool CanTrustPageIndexMinMax(const ColumnDescriptor& descr) { | ||
| const auto column_order = descr.column_order().get_order(); | ||
| return column_order != ColumnOrder::UNKNOWN && column_order != ColumnOrder::UNDEFINED && | ||
| descr.sort_order() != SortOrder::UNKNOWN; | ||
| } | ||
|
|
||
| template <typename DType> | ||
| void Decode(std::unique_ptr<typename EncodingTraits<DType>::Decoder>& decoder, | ||
| const std::string& input, std::vector<typename DType::c_type>* output, | ||
|
|
@@ -973,6 +979,9 @@ std::unique_ptr<ColumnIndex> ColumnIndex::Make(const ColumnDescriptor& descr, | |
| // Guard against UB when moving column_index | ||
| throw ParquetException("Invalid ColumnIndex boundary_order"); | ||
| } | ||
| if (!CanTrustPageIndexMinMax(descr)) { | ||
| return nullptr; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't seem right for a factory function to be allowed to return NULL. It's also an API change.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note we're raising an exception if we encounter an unknown boundary order above.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I think the bottom line is that the Instead, perhaps
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense! I've reverted changes related to |
||
| } | ||
|
wgtmac marked this conversation as resolved.
Outdated
|
||
| switch (descr.physical_type()) { | ||
| case Type::BOOLEAN: | ||
| return std::make_unique<TypedColumnIndexImpl<BooleanType>>(descr, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.