Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Nested-column pruning uses terminal NULL and OFFSET components to read only null maps or offsets. The legacy wire format encodes every access path as DATA, which makes those metadata selectors ambiguous with real nested fields that have the same names. Introduce an optional access-path version, preserve it through Thrift and protobuf descriptors, and use the path type to select the authoritative DATA or META payload in the typed version. New BEs continue to decode the legacy all-DATA format from old FEs, while the supported rolling-upgrade order upgrades all BEs before the FE emits typed paths. Refactor nested iterator planning to separate current data, current metadata, and descendant routing, and keep sibling META paths explicit so unrelated DATA projections do not disable metadata-only reads.
### Release note
Fix metadata-only nested-column pruning and distinguish metadata selectors from same-named data fields.
### Check List (For Author)
- Test: Unit Test and Regression Test
- `./run-fe-ut.sh --run 'org.apache.doris.nereids.rules.rewrite.PruneNestedColumnTest,org.apache.doris.analysis.DescriptorToThriftConverterTest'` (74 passed on the final rebased FE tree)
- `./run-be-ut.sh --run --filter='ColumnReaderTest.*:SlotDescriptorTest.AccessPathsPreservedThroughProtobuf'` (50 passed before the final rebase; the final rebuild was blocked before GTest by the missing master-added `liblance_c.a`)
- `nereids_rules_p0/column_pruning/string_length_column_pruning`, `nereids_rules_p0/column_pruning/null_column_pruning`, and `nereids_rules_p0/column_pruning/nested_container_offset_pruning` (passed before the final rebase; the final rerun was blocked by the same missing dependency)
- Behavior changed: Yes. Version-1 paths use explicit DATA/META payload semantics, while absent/version-0 paths retain the legacy encoding.
- Does this need documentation: No
Co-authored-by: minghong <zhouminghong@selectdb.com>
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: The descendant access-path router used generic route terminology for container-specific selection, rewriting, and distribution, and referred to the payload selected by the path type as normalized or active. Rename the internal helpers and result fields to describe their actual behavior, document selected-payload semantics, and keep routing behavior unchanged.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- `./run-be-ut.sh --run --filter='ColumnReaderTest.*'` was attempted, but no test binary ran because `thirdparty/installed/lib64/liblance_c.a` is missing.
- `build-support/check-format.sh`
- Behavior changed: No. This only renames internal helpers, result fields, local variables, and tests, and clarifies comments.
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Map descendant routing rewrote logical KEYS and VALUES selectors to physical key/value child column names before forwarding paths. Those physical names are storage/schema details and should not participate in the access-path contract. Make Map child iterators consume KEYS/VALUES as their stable logical names, keep explicit selectors unchanged, and expand wildcard paths directly to KEYS/VALUES. Add focused coverage for physical-name independence and nested Map wildcard routing.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- `build-support/check-format.sh`
- `./run-be-ut.sh --run --filter='ColumnReaderTest.*'` (blocked before compilation because `thirdparty/installed/lib64/liblance_c.a` is missing)
- Behavior changed: No. Map routing uses the same key/value children but no longer depends on their physical names.
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: DescendantAccessPathRouter documented its input assumptions but not the complete per-level processing flow. Add a class-level comment describing common path splitting, current DATA and metadata handling, container-specific Struct/Array/Map routing, child read requirements, and recursive nested processing.
### Release note
None
### Check List (For Author)
- Test: No need to test. Comment-only change.
- `build-support/check-format.sh`
- `git diff --check`
- Behavior changed: No.
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
|
run buildall |
|
Codex automated review failed and did not complete. Error: Codex completed, but no new pull request review was submitted for the current head SHA. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
FE UT Coverage ReportIncrement line coverage |
### What problem does this PR solve? Issue Number: None Related PR: #65591 Problem Summary: Map descendant access-path routing silently ignored selectors other than `*`, `KEYS`, and `VALUES`. This could drop the only descendant path and prune both key and value iterators instead of reporting an invalid FE-BE access-path contract. Reject invalid selectors during classification while continuing to inspect only the payload selected by the path type. ### Release note None ### Check List (For Author) - Test: Unit Test - Added `ColumnReaderTest.MapRejectsUnrecognizedDescendantSelectors` - Focused UT execution was blocked before linking because `thirdparty/installed/lib64/liblance_c.a` is missing - `build-support/check-format.sh` - `git diff --check` - Behavior changed: Yes. Invalid Map descendant access-path selectors now return an internal error instead of being silently ignored. - Does this need documentation: No
Issue Number: None Related PR: #65591 Problem Summary: Emitting the parent Struct null path for `element_at` null predicates changes the nested-column plan from a child-only predicate path to parent and child null paths. Update the regression assertions and comments to validate both paths. Also replace a misplaced Javadoc marker that caused FE Checkstyle to fail. None - Test: Regression test / Manual test - `./build.sh --fe` - `./run-regression-test.sh --conf output/local-regression/regression-conf-20000.groovy --run -d nereids_rules_p0/column_pruning -s null_column_pruning` - `git diff --check` - Behavior changed: No. This updates validation for the existing Struct null-path behavior. - Does this need documentation: No
TPC-H: Total hot run time: 29551 ms |
TPC-DS: Total hot run time: 178285 ms |
ClickBench: Total hot run time: 25.73 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
/review |
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
There was a problem hiding this comment.
Automated review: changes requested
I found one blocking issue: the newly added outer-join FE unit test expects a DATA access path that the changed collector cannot emit for the nullable struct field declared by that fixture. The inline comment gives the exact trace and correction.
Critical checkpoint summary:
- Goal and scope: the PR introduces versioned typed DATA/META access paths and recursively routes metadata-only reads through scalar, Struct, Array, and Map iterators. The 14-file scope is cohesive around that protocol and pruning change.
- Correctness and tests: descriptor forwarding, nested routing, read phases, map wildcard expansion, physical-versus-synthetic nullability, and the added FE/BE test matrices were reviewed. One new FE assertion is internally inconsistent and deterministically fails; no other substantiated correctness issue remains.
- Compatibility: reachable old-FE to new-BE traffic remains compatible through legacy DATA encoding. New-FE to old-BE typed META traffic is mechanically incompatible, but it is outside Doris's supported BE-first rolling-upgrade order, so it is not reported as a defect. Thrift/protobuf forwarding otherwise preserves version, type, and selected payload.
- Parallel and special paths: external FileScan/TVF paths normalize META suffixes back to DATA before AccessPathParser; variant, MV-fragment, short-circuit, row-id, and deep nested paths were checked without another finding.
- Concurrency, lifecycle, configuration, persistence, and write paths: this PR does not introduce material changes in these areas. Error validation and status propagation are explicit, and routing work occurs during iterator setup rather than row hot loops.
- Validation: review was static because the review contract prohibited builds and this checkout lacks thirdparty/installed and protoc. Live CI had passed compilation, Checkstyle, Clang Formatter, license, and dependency checks at submission time; FE/BE and regression suites were still running. The macOS BE-UT failure was an unrelated runner JDK-version setup failure.
- User focus: no additional focus points were supplied.
| + " on driving_tbl.id = not_null_struct_tbl.id" | ||
| + " where element_at(not_null_struct_tbl.s, 'f') is null", | ||
| // expect-contain: field is read (DATA path) | ||
| ImmutableList.of(path("s", "f")), |
There was a problem hiding this comment.
[P1] Expect the nullable field's metadata path
The DDL above declares struct<f:int>, so f is nullable by default. Starting from the IS NULL META context, visitElementAt only resets to DATA when !field.isNullable(); here it suppresses the physical root [s,NULL] but records META [s,f,NULL]. Because ColumnAccessPath.compareTo includes the type, this new test cannot find DATA [s,f] and fails. Please expect metaPath("s", "f", "NULL") while continuing to forbid root META [s,NULL]; the separate programmatic testNotNullFieldPreservedInAccessPaths() test already covers the non-nullable-field DATA branch.
FE UT Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 29454 ms |
TPC-DS: Total hot run time: 177205 ms |
ClickBench: Total hot run time: 25.57 s |
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)