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

   ## Summary
   
   - Fixed a bug where sequential `BUILD INDEX` operations with multiple 
analyzers on the same column produce query results inconsistent with tables 
having indexes defined at creation time
   - Root cause: `BUILD INDEX` appends indexes in execution order, not tablet 
schema order. `select_best_reader()` picks the first matching index, so 
different rowsets select different indexes for the same query
   - Fix: reorder output rowset schema indexes to match tablet schema order 
after each build via new `TabletSchema::reorder_indexes_by()`
   
   ## Test plan
   
   - [x] Unit tests: `TestReorderIndexesBy`, 
`TestReorderIndexesByWithExtraIndexes` in `tablet_schema_index_test.cpp`
   - [x] Regression test: `test_build_index_multi_analyzer_order` - validates 
build index path matches direct-insert baseline for regex queries across 
multiple analyzers
   - [x] Manual verification with wikipedia dataset (1M rows) confirming fix 
resolves DORIS-24685
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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