github-actions[bot] commented on code in PR #63138:
URL: https://github.com/apache/doris/pull/63138#discussion_r3259505042


##########
be/src/storage/index/inverted/query_v2/collect/multi_segment_util.h:
##########
@@ -63,8 +179,8 @@ inline QueryExecutionContext 
create_segment_context(lucene::index::IndexReader*
 template <typename SegmentCallback>
 void for_each_index_segment(const QueryExecutionContext& context, const 
std::string& binding_key,
                             SegmentCallback&& callback) {
-    auto* reader = context.readers.empty() ? nullptr : 
context.readers.front().get();

Review Comment:
   This only fixes callers that go through `for_each_index_segment`, but 
`FunctionSearch::evaluate_inverted_index_with_search_param` still extracts 
NULLs after collection with `weight->scorer(exec_ctx, root_binding_key)` on the 
original `exec_ctx` (see the `exec_ctx.null_resolver` block after the collector 
call). Term/boolean scorers construct `SegmentPostings` immediately via 
`create_term_posting()`, so a query over a nullable field whose reader is 
`MultiReader`/`MultiSegmentReader` can still reach the same unsupported 
multi-segment `TermDocs::readBlock()` path after collection succeeds. Please 
route null-bitmap extraction through segment contexts as well, or otherwise 
avoid building `SegmentPostings` on the unsplit multi-segment reader, and add a 
nullable multi-segment test for this path.



-- 
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