wgtmac commented on code in PR #36866:
URL: https://github.com/apache/arrow/pull/36866#discussion_r1274288081
##########
cpp/src/parquet/metadata.cc:
##########
@@ -97,12 +97,15 @@ static std::shared_ptr<Statistics> MakeTypedColumnStats(
metadata.statistics.__isset.null_count,
metadata.statistics.__isset.distinct_count);
}
+ // GH-34139: If SortOrder is not SIGNED, ignore min and max.
+ bool can_use_legacy_min_max = descr->sort_order() == SortOrder::SIGNED;
// Default behavior
return MakeStatistics<DType>(
descr, metadata.statistics.min, metadata.statistics.max,
metadata.num_values - metadata.statistics.null_count,
metadata.statistics.null_count, metadata.statistics.distinct_count,
- metadata.statistics.__isset.max || metadata.statistics.__isset.min,
+ can_use_legacy_min_max &&
+ (metadata.statistics.__isset.max || metadata.statistics.__isset.min),
Review Comment:
I tried to change `||` to `&&` in an old PR and it caused some test failure
because filter pushdown of dataset scanner can handle the case when either min
or max is missing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]