yy782 opened a new issue, #70376: URL: https://github.com/apache/doris/issues/70376
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Description Doris currently does **not** support predicate pushdown on struct columns. When a query filters on a field of a struct, for example: ```sql SELECT * FROM t WHERE s.a < 2; SELECT * FROM t WHERE s.a.b = true; ``` the field predicate does not participate in statistics-based pruning (neither at the segment level nor, for external tables, at the row-group level). The struct column is materialized in full and the field predicate is evaluated row by row, so segments and row groups that could never satisfy the predicate are still read. This causes avoidable IO, and the cost grows with wide struct columns and large lakehouse files. Other query engines have already implemented this. DuckDB, for instance, added basic struct filter pushdown in [duckdb#10314](https://github.com/duckdb/duckdb/pull/10314) ("Basic struct filter pushdown", by Maxxen), which pushes a `struct_extract(col, field)` predicate down to the scan — covering base storage, the Parquet reader, and PyArrow/Pandas scans — and prunes row groups using per-field `min`/`max` statistics. This issue proposes bringing equivalent struct-field predicate pushdown to Doris. ### Solution The goal is to reuse Doris's existing predicate-pushdown / zone-map pruning path rather than introducing a struct-specific mechanism. The intended direction is: 1. **Per-field statistics for struct columns.** Maintain statistics per child field of a struct column (each field carrying its own `min`/`max` bounds), so the field's range is known independently of the whole struct. 2. **Recognize field-access in predicate pushdown.** Teach the predicate-pushdown capability check to recognize field-access expressions and extract the child field's statistics, so a field predicate can be evaluated against that field's bounds. 3. **Push the field predicate down to the scan and prune.** Push the field predicate into the scan operator and use it for pruning, reusing the existing zone-map pruning logic. 4. **Nested struct support.** Extend field-access handling to multi-level access (`s.a.b`), reusing the same per-field statistics recursion. Acceptance: query results must be row-for-row identical with pruning enabled versus disabled. ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
