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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: N/A
   
   Problem Summary: Multi-segment collection creates a QueryExecutionContext 
for each CLucene sub-reader. Copying the root NULL bitmap resolver into that 
context lets nullable boolean scorers interpret a table-level NULL bitmap with 
local docids. For example, consider two sub-readers with two documents each. In 
the first sub-reader, local doc 0 maps to global doc 0 and is NULL. In the 
second, local doc 0 maps to global doc 2. The root NULL bitmap is therefore 
{0}. For NOT PREFIX(title, "missing"), the second sub-reader incorrectly treats 
global bitmap entry 0 as its local doc 0, excludes global doc 2, and 
contributes only global doc 3. The collected TRUE bitmap becomes {1,3}; masking 
the actual root NULL bitmap {0} cannot restore doc 2, while the correct result 
is {1,2,3}. Keep the resolver on the root context only. The collector test 
covers this two-sub-reader case and verifies that the final NOT result retains 
global doc 2.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - ./run-be-ut.sh --run --filter=MultiSegmentCollectorTest.* -j16
   - Behavior changed: Yes (fixes incorrect multi-segment boolean query results 
with NULLs)
   - 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