Repository navigation
Conversation
|
|
||
| Result<bool> In(const std::shared_ptr<Bound>& expr, | ||
| const BoundSetPredicate::LiteralSet& values) override { | ||
| return AnyMatch(expr, [&](const Literal& item) { return values.contains(item); }); |
There was a problem hiding this comment.
This will return false for NaN.
There was a problem hiding this comment.
Literal uses a custom comparison, so contains can match the same NaN literal in the set, I'm not sure if this is your concern.
| Result<bool> StartsWith(const std::shared_ptr<Bound>& expr, | ||
| const Literal& value) override { | ||
| return AnyMatch(expr, [&](const Literal& item) { | ||
| return std::get<std::string>(item.value()) |
There was a problem hiding this comment.
This can thrown uncaught if the variant is not a string.
There was a problem hiding this comment.
Binder already checks that the term is a string and converts the prefix literal to the same type. ParquetMetricsRowGroupFilter also relies on this and uses std::getstd::string for StartsWith and NotStartsWith.
There was a problem hiding this comment.
After a second check, it seems users can still manually create an invalid BoundPredicate and bypass Binder's checks. But this is rare, we can address this for both filters in a follow-up if needed.
Use column dictionaries to prune row groups after footer-statistics filtering. Support comparison, set, prefix and NaN predicates, and cache decoded dictionaries within each row group. Keep row groups when encoding metadata cannot rule out plain fallback or field IDs and types cannot be resolved safely. Preserve file-relative row positions and row IDs after pruning. Share physical-value conversion with Parquet metrics and add tests for predicate handling, type promotion, mixed encoding, splits and invalid dictionary pages.
Read the byte range between dictionary_page_offset and data_page_offset instead of loading the full column chunk during planning. Validate the range and keep using Arrow for page decompression. Skip dictionary pruning for encrypted columns so the normal reader handles them. Treat unreadable optional statistics as possible nulls instead of failing the scan. Keep errors for missing or truncated dictionary pages, and explain why rewritten null branches remain inclusive. Add regression tests for planning read ranges with multi-megabyte data pages, invalid offsets, unreadable statistics, signed zeros, and compressed V1/V2 pages. The complete Parquet suite passes all 213 tests, and pre-commit passes.
Use metadata-only projection to keep output-column prefetch out of the dictionary I/O assertion. Add float/double IN and NOT IN coverage with NaN literals.
d1de99e to
a81101f
Compare
Use column dictionaries to prune row groups after footer-statistics filtering. Support comparison, set, prefix and NaN predicates, and cache decoded dictionaries within each row group.
Keep row groups when encoding metadata cannot rule out plain fallback or field IDs and types cannot be resolved safely. Preserve file-relative row positions and row IDs after pruning.
Share physical-value conversion with Parquet metrics and add tests for predicate handling, type promotion, mixed encoding, splits and invalid dictionary pages.