github-actions[bot] commented on code in PR #65493:
URL: https://github.com/apache/doris/pull/65493#discussion_r3565735652
##########
be/src/format_v2/parquet/parquet_statistics.cpp:
##########
@@ -969,10 +983,13 @@ bool set_page_decoded_min_max(const
std::shared_ptr<::parquet::ColumnIndex>& col
page_idx >= typed_index->max_values().size()) {
return false;
}
- if (!set_decoded_field(column_schema, value_kind,
typed_index->min_values()[page_idx],
- &page_statistics->min_value, timezone) ||
- !set_decoded_field(column_schema, value_kind,
typed_index->max_values()[page_idx],
- &page_statistics->max_value, timezone)) {
+ const auto& min_value = typed_index->min_values()[page_idx];
+ const auto& max_value = typed_index->max_values()[page_idx];
+ if (!valid_min_max(min_value, max_value) ||
+ !set_decoded_field(column_schema, value_kind, min_value,
&page_statistics->min_value,
Review Comment:
This makes the NaN fallback slot-wide for page indexes. When one page has a
NaN min/max, `set_page_decoded_min_max` returns `false`,
`build_page_statistics` propagates that, and `select_ranges_for_expr_zonemap`
clears `ranges` and returns `false`, so the caller skips page-index pruning for
the entire slot. A row group with page 0 containing NaN stats and page 1 having
finite `[1, 2]` under `f > 100` should conservatively keep page 0 but can still
prune page 1; today both pages remain selected. Can we distinguish invalid
min/max from an unusable column index here, e.g. return success with
`has_min_max=false` for just the NaN page so later pages can still be evaluated?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]