LLLLLL302311 opened a new pull request, #67249:
URL: https://github.com/apache/doris/pull/67249
### What problem does this PR solve?
Problem Summary:
A single `ColumnStat` is shared across the child predicates of an AND/OR
group, which may reference different columns. After the first child loaded
column A's bloom filter into `stat.bloom_filter`, the next child on column B
saw it non-empty, skipped loading B's own bloom, and tested B's value against
A's bloom -> almost always a false miss -> the whole row group was wrongly
filtered out, silently dropping matching rows.
The write-back path made it worse: it keyed the per-column cache by
`stat.col_schema`, which is overwritten by every child's `get_stat_func` and
may no longer match the column that actually owns the held bloom filter, so the
bloom could be stashed under the wrong column id.
The fix tracks the owning physical column id via
`ColumnStat::bloom_filter_col_id`. Before checking the cache, if the held bloom
belongs to a different column, it is stashed back and cleared so this column
loads its own bloom. The write-back cache is keyed by `bloom_filter_col_id`
instead of `col_schema`.
### Release note
Fix Parquet bloom filter being reused across different columns within an
AND/OR predicate group, which could wrongly skip row groups and drop matching
rows.
### Check List (For Author)
- Test
- [x] Unit Test
- Behavior changed:
- [x] Yes. Queries that previously dropped matching rows due to the
cross-column bloom filter reuse now return correct results.
- Does this need documentation?
- [x] No.
--
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]