FANNG1 opened a new pull request, #67553:
URL: https://github.com/apache/doris/pull/67553
### What problem does this PR solve?
Issue Number: close #67117
Related PR: None
Problem Summary: When multiple Lance vector indexes exist on the same
column, Doris previously selected the first physical index segment before
checking its metric. If that logical index used a different metric, Doris fell
back to flat search without trying a later compatible index.
Group physical index segments by logical index name, visit logical indexes
in lexicographic name order, filter each complete group by the requested
metric, and select the first group that can be planned safely. If no compatible
usable group exists, preserve the existing flat-search fallback. This keeps
every physical segment of one logical index together and never mixes segment
UUIDs from different logical indexes.
### Release note
Fix Lance vector index selection when multiple indexes with different
metrics exist on the same column.
### Check List (For Author)
- Test: Unit Test / FE validation
- `mvn validate -pl fe-core -am -DskipTests` passed, including
Checkstyle.
- Added `LanceScanNodeTest` cases for metric matching, metadata-order
independence, lexicographic logical-index selection, DEFAULT-to-L2 behavior,
unsafe-group skipping, and multi-segment UUID grouping.
- `./run-fe-ut.sh --run
org.apache.doris.datasource.lance.source.LanceScanNodeTest` was attempted but
blocked before `fe-core`: the macOS prebuilt thirdparty Thrift compiler
generates Java incompatible with this historical branch, causing `fe-common`
compilation errors.
- Behavior changed: Yes. Doris now tries metric-compatible logical Lance
indexes in lexicographic index-name order before falling back to flat search.
- 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]