Skip to content

[fix](variant) Bind Variant search to nested indexes#63765

Draft
eldenmoon wants to merge 1 commit into
apache:branch-4.1from
eldenmoon:branch-pick-63660-4.1
Draft

[fix](variant) Bind Variant search to nested indexes#63765
eldenmoon wants to merge 1 commit into
apache:branch-4.1from
eldenmoon:branch-pick-63660-4.1

Conversation

@eldenmoon
Copy link
Copy Markdown
Member

What problem does this PR solve?

Backport #63660 to branch-4.1.

This fixes Variant inverted-index search binding for scalar and nested Variant paths. It resolves search clauses to the correct scalar or nested Variant index reader, maps nested leaf query results back to the expected document scope, and preserves null bitmap semantics when the truth bitmap is empty.

The backport keeps the original behavior changes and adapts the segment index iterator call to the existing branch-4.1 ColumnReader API.

Issue Number: N/A

Related PR: #63660

Release note

Fix Variant inverted-index search binding for scalar and nested Variant paths.

Check List (For Author)

  • Test:
    • Unit Test: ./run-be-ut.sh --run --filter='Variant:FunctionSearchTest.TestBuildLeafQueryDirectUnknownClauseUsesLeafMapper:FunctionSearchNestedTest.*:BitSetQueryTest.EmptyTruthBitmapPreservesNullBitmap'
      • Result: 207 passed, 1 skipped (VariantDocModeCompactionTest.variant_doc_mode_compaction_merge_10_segments, Release-only slow test)
  • Behavior changed: Yes. Fixes Variant inverted-index search binding and null bitmap handling.
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#63660

Problem Summary: Backport apache#63660 to branch-4.1. Bind Variant inverted-index search to the resolved scalar or nested Variant index reader, map nested leaf results back to the expected document scope, and preserve null bitmap semantics for empty bitset truth bitmaps. Adapt the segment index iterator call to the branch-4.1 ColumnReader API.

Cherry-picked from commits 8310d28 and 315ad31.

### Release note

Fix Variant inverted-index search binding for scalar and nested Variant paths.

### Check List (For Author)

- Test:
    - Unit Test: ./run-be-ut.sh --run --filter='*Variant*:FunctionSearchTest.TestBuildLeafQueryDirectUnknownClauseUsesLeafMapper:FunctionSearchNestedTest.*:BitSetQueryTest.EmptyTruthBitmapPreservesNullBitmap'
- Behavior changed: Yes. Fixes Variant inverted-index search binding and null bitmap handling.
- Does this need documentation: No
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants