feat: projeciton not work#10
Conversation
There was a problem hiding this comment.
💡 Codex Review
greptimedb/src/mito2/src/read/flat_projection.rs
Lines 117 to 118 in e0e67da
read_column_ids can contain extra columns required by pushed-down filters (from ScanRegion::build_read_column_ids), but this call builds ReadColumns using only projection_input.nested_paths. When a query projects one subfield (e.g. j.a) and filters on another subfield under the same root column (e.g. j.b), the reader will prune to only j.a, and later filter evaluation runs on incomplete data, which can drop matching rows or produce incorrect results. We need to merge filter-required nested paths (or disable nested pruning for predicate-referenced roots) before constructing ReadColumns.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Building read columns from projection_input.nested_paths here can prune away nested fields that are only referenced by filters: scan_region::build_read_column_ids adds predicate-required root columns, but it does not add predicate subpaths, so a query like SELECT j.a ... WHERE j.b = ... can read only j.a and evaluate the predicate on incomplete data, yielding incorrect results. Either merge predicate nested paths before build_read_columns or disable nested pruning for predicate-referenced roots.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8a6a1cb
into
feat/nested-projection-support-epic
* fix: projeciton not work and other questions
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
PLEASE DO NOT LEAVE THIS EMPTY !!!
Please explain IN DETAIL what the changes are in this PR and why they are needed:
Checklist
Refer to a related PR or issue link (optional)