eldenmoon opened a new pull request, #66449:
URL: https://github.com/apache/doris/pull/66449

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #60847, #63660
   
   Problem Summary:
   
   OlapScanner materializes a requested Variant path as a scan-schema column. 
For example, data.items.message gets its own SlotRef and scan column position. 
VariantColumnReader then resolves either direct subcolumn index metadata or 
metadata inherited from data, and SegmentIterator constructs the runtime 
iterator for that child column with the complete stored Variant path.
   
   VSearch duplicated that storage responsibility. When the child iterator was 
absent, it resolved the tablet ColumnId for data, borrowed the parent iterator, 
and synthesized a stored field name. This mixed scan column positions with 
tablet ColumnIds and could bypass the path and physical index selection already 
performed by the storage layer, including NestedGroup selection.
   
   This PR removes the expression-level parent rebinding. VSearch now consumes 
only the iterator attached to the SlotRef scan column. If that iterator is 
absent, the field remains an empty index input. It also removes the three 
fallback-only IndexExecContext APIs and separates SlotRef collection into a 
small helper that names the scan column index explicitly.
   
   A focused unit test constructs the exact boundary case: the data parent 
iterator exists, while the data.items.message child iterator does not. The test 
verifies that SEARCH does not mark or execute the parent iterator.
   
   ### Release note
   
   Variant SEARCH no longer borrows a parent Variant iterator when the 
materialized child iterator is absent.
   
   ### Check List (For Author)
   
   - Test: Unit Test and Regression Test
       - ASAN BE build: ./build.sh --be
       - Unit Test: 60 tests passed across VSearchExprTest, 
NestedGroupProviderTest, DefaultNestedGroupReadProviderTest, 
NestedGroupReaderTest, and NestedGroupPathMatchTest
       - Regression Test: variant_p0/test_variant_search_subcolumn passed; 1 
suite, 0 failed, 0 fatal, 0 skipped
       - Format: build-support/check-format.sh passed with clang-format 16
       - Static analysis: build-support/run-clang-tidy.sh was attempted. The 
actionable function-size diagnostic in this diff was fixed; completion remains 
blocked by the existing unmatched NOLINTEND in be/src/core/types.h and the 
toolchain failing to find system stddef.h.
   - Behavior changed: Yes. A missing Variant child iterator now produces an 
empty index result instead of being reinterpreted through the parent iterator.
   - Does this need documentation: 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]

Reply via email to