airborne12 opened a new pull request, #68678:
URL: https://github.com/apache/doris/pull/68678
### What problem does this PR solve?
Issue Number: None
Related PR: #68602 (master)
Problem Summary:
`CollectionSimilarity` is used by both inverted-index and SNII queries but
lived under `storage/compaction`. This backport moves its implementation,
header and test to `storage/index` and updates every direct include. The
scoring code is unchanged. The 4.2 compile-check markers and surrounding
branch-specific declarations remain intact.
### Release note
None. This changes source layout only.
### Check List (For Author)
- Test:
- [x] Regression test
- [x] Unit Test
- [ ] Manual test
- Behavior changed:
- [x] No.
- Does this need documentation?
- [x] No. Source layout only.
### Backport audit
Source merge commit: `7c2f99b1bc03c0b43a877fe90837172f4de637c3`; backport
commit: `5c0e125b07240d8fd4344bbe0793ddc533ae657b`.
| Source file | Source hunk | Disposition |
| --- | --- | --- |
| `be/src/storage/index/collection_similarity.cpp` | `@@ -18 +18 @@` |
Ported: Source include-path change is present. |
| `be/src/storage/index/collection_similarity.cpp` | `@@ -168 +168 @@ void
CollectionSimilarity::find_top_k_scores(const roaring::Roaring* row_bitmap,` |
Adapted: 4.2 compile-check end marker retained. |
| `be/src/storage/index/collection_similarity.h` | `R100 (no @@ hunk)` |
Adapted: File moved; 4.2 compile-check markers retained. |
| `be/src/storage/index/index_query_context.h` | `@@ -23 +23 @@` | Adapted:
Source include path updated; 4.2 compile-check markers and local type includes
retained. |
| `be/src/storage/index/inverted/query_v2/collect/doc_set_collector.h` |
`all source hunks` | Ported(verbatim): Target file matches source blob. |
| `be/src/storage/index/inverted/query_v2/collect/top_k_collector.h` | `@@
-29 +29 @@` | Ported: Source include-path change is present. |
|
`be/src/storage/index/inverted/query_v2/scored_bit_set_query/scored_bit_set_scorer.h`
| `all source hunks` | Ported(verbatim): Target file matches source blob. |
| `be/src/storage/segment/segment_iterator.cpp` | `@@ -80 +79,0 @@` |
Ported: Source include-path change is present. |
| `be/src/storage/segment/segment_iterator.cpp` | `@@ -85,0 +85 @@` |
Ported: Source include-path change is present. |
| `be/test/storage/index/collection_similarity_test.cpp` | `all source
hunks` | Ported(verbatim): Target file matches source blob. |
|
`be/test/storage/index/inverted/inverted_index_reader_analysis_purpose_test.cpp`
| `@@ -32 +32 @@` | Ported: Source include-path change is present. |
| `be/test/storage/index/inverted/query/phrase_prefix_query_test.cpp` | `all
source hunks` | Ported(verbatim): Target file matches source blob. |
| `be/test/storage/index/inverted/query/query_helper_test.cpp` | `all source
hunks` | Ported(verbatim): Target file matches source blob. |
| `be/test/storage/index/snii/snii_index_reader_candidate_test.cpp` | `all
source hunks` | Ported(verbatim): Target file matches source blob. |
`git range-diff` shows only the expected branch differences: the 4.2
compile-check markers remain in the moved files and index query context; the
4.2 segment iterator and collector headers retain unrelated branch-specific
declarations. Every source include-path change is present.
### Validation
- BE ASAN build: passed.
- BE ASAN unit tests: 58/58 passed across `CollectionSimilarityTest` (27),
`SniiIndexReaderCandidateTest` (9), `InvertedIndexReaderAnalysisPurposeTest`
(5), `PhrasePrefixQueryTest` (7), and `QueryHelperTest` (10). No sanitizer
report.
- Isolated regression: `inverted_index_p0/test_phrase_candidate_pushdown`
and `storage_format/test_storage_format_snii_norms`; one suite each, zero
failures.
- Complete PR diff English check: passed with no data exceptions.
- Merged-tree clang-format 16 preflight: passed against `origin/branch-4.2`
at `7e4909b904ff49fc799e5a4efa02f03fe4a8638d`.
- Advisory clang-tidy did not complete: the branch's warning-as-error
setting promoted existing diagnostics in `segment_iterator.cpp`, and Clang 16
reported existing `jni-util.h` static assertions. No tidy pass is claimed.
--
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]