Gabriel39 opened a new pull request, #65494:
URL: https://github.com/apache/doris/pull/65494
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
FileScannerV2 returned Parquet footer min/max statistics as exact aggregate
values. Parquet permits BYTE_ARRAY and FIXED_LEN_BYTE_ARRAY statistics to be
truncated bounds, and the Arrow 17 statistics API does not expose the
`is_min_value_exact` and `is_max_value_exact` flags. A pushed-down MAX could
therefore be a synthetic upper bound that does not occur in the data.
This change rejects Parquet MIN/MAX aggregate pushdown for both binary
physical types. The upper table reader receives `NotSupported` and falls back
to a normal scan. Binary statistics remain available for safe pruning, COUNT is
unchanged, and exact numeric MIN/MAX pushdown remains enabled.
### Release note
Fix incorrect Parquet MIN/MAX aggregate results for truncated binary
statistics.
### Check List (For Author)
- Test: Unit Test
- `ParquetScanTest.AggregateMinMaxRejectsInexactBinaryStatistics`
- `ParquetScanTest.AggregateCountAndMinMaxUseAllSelectedRowGroups`
- Behavior changed: Yes. Parquet binary MIN/MAX aggregate pushdown now falls
back to scanning.
- Does this need documentation: No
Validation on the designated Linux build host:
- `build-support/check-format.sh`
- Targeted BE unit tests: 2 tests passed
- `run-clang-tidy.sh` was attempted; analysis reports pre-existing full-file
complexity/style diagnostics and `jni-util.h` toolchain static assertions
unrelated to this change.
--
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]