yiguolei opened a new pull request, #71250:
URL: https://github.com/apache/doris/pull/71250
### What problem does this PR solve?
Issue Number: None
Related PR: #70788
Backport #70788 (`c80210883391806418a34f8a39c85fec32bc028d`) to `branch-4.2`.
ANN TopN and range queries currently hide index-loading failures by falling
back to brute-force evaluation. This change permits fallback only when the
index is missing and propagates other loading failures. Empty V2/V3 index
containers return `INVERTED_INDEX_FILE_NOT_FOUND`, so they follow the
missing-index fallback policy for both ANN and inverted predicates.
Backport adaptations:
- Preserve branch-4.2 column-ID mapping and `_need_read_data_indices` in ANN
consumers.
- Adapt the added tests to the branch-4.2 `Schema`, `SegmentIterator`, and
range-evaluation interfaces.
- Update the existing index-builder test helper in place, retaining its
branch-specific implementation.
### Validation
- `git diff --cached --check` passed before committing; no unresolved
conflicts remain.
- Includes ANN load-status unit coverage, empty-container fallback-policy
checks, and updated regression assertions from #70788.
- Builds, unit tests, and regression tests were not run for this backport,
following the author's preference. Historical results in the original PR do not
validate this branch adaptation.
### Release note
ANN queries continue to fall back when index data is absent, but now report
other index-loading failures. Empty V2/V3 containers follow the missing-index
policy, including `enable_fallback_on_missing_inverted_index`, and report
E-6003 while retaining the `is empty` diagnostic. No persisted format or
configuration default changes.
### Check List (For Author)
- Test cases included (not executed for this backport):
- [x] Regression test
- [x] Unit Test
- [ ] Manual test
- Behavior changed:
- [x] Yes. Non-missing ANN loading failures reach the caller; empty
containers use the missing-index fallback policy.
- Does this need documentation?
- [x] Yes. Same documentation follow-up as #70788; no documentation PR
is included here.
### AI Disclosure
- Tool: Codex.
- Generated: Backport conflict resolution, test-interface adaptations, and
this description.
- Human review: The author authorized the backport, conflict resolution, and
PR publication; full code review is not asserted.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]