Skip to content

branch-4.1: [feature](fe) Support ANN indexes on MoW tables - #67155

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
airborne12:pick-61994-branch-4.1
Aug 27, 2026
Merged

branch-4.1: [feature](fe) Support ANN indexes on MoW tables#67155
yiguolei merged 1 commit into
apache:branch-4.1from
airborne12:pick-61994-branch-4.1

Conversation

@airborne12

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: N/A

Related PR: #61994

Problem Summary:
This backports ANN index support for unique-key merge-on-write tables to branch-4.1. FE validation previously restricted ANN indexes to DUP_KEYS tables even though merge-on-write scans filter deleted rows before ANN candidates are evaluated. The change permits ANN indexes only for UNIQUE_KEYS tables with merge-on-write enabled, preserves rejection for merge-on-read tables, and covers both the Nereids and legacy branch-4.1 CREATE INDEX validation paths.

Release note

Support ANN indexes on unique-key merge-on-write tables.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
    • Verification:
      • ORC_FORMAT_URL=http://archive.apache.org/dist/orc/orc-format-1.0.0/orc-format-1.0.0.tar.gz ./build.sh --be --fe -j 160
      • ./run-fe-ut.sh --run org.apache.doris.nereids.trees.plans.commands.IndexDefinitionTest,org.apache.doris.alter.SchemaChangeHandlerTest
      • ./run-regression-test.sh --run -d ann_index_p0 -s ann_index_on_mow,build_ann_index_test,create_ann_index_test,create_tbl_with_ann_index_test -parallel 4
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

### What problem does this PR solve?

Issue Number: None

Related PR: apache#61994

Problem Summary: FE validation restricted ANN indexes to DUP_KEYS tables even though unique-key merge-on-write scans filter deleted rows before ANN candidates are evaluated. Allow ANN indexes for UNIQUE_KEYS tables only when merge-on-write is enabled, while preserving rejection for merge-on-read tables. Port the validation through both Nereids and the legacy branch-4.1 CREATE INDEX path, and add regression coverage for table creation, index building, updates, deletes, and ANN queries.

### Release note

Support ANN indexes on unique-key merge-on-write tables.

### Check List (For Author)

- Test: Regression test / Unit Test
    - `ORC_FORMAT_URL=http://archive.apache.org/dist/orc/orc-format-1.0.0/orc-format-1.0.0.tar.gz ./build.sh --be --fe -j 160`
    - `./run-fe-ut.sh --run org.apache.doris.nereids.trees.plans.commands.IndexDefinitionTest,org.apache.doris.alter.SchemaChangeHandlerTest`
    - `./run-regression-test.sh --run -d ann_index_p0 -s ann_index_on_mow,build_ann_index_test,create_ann_index_test,create_tbl_with_ann_index_test -parallel 4`
- Behavior changed: Yes. ANN indexes can now be created and built on unique-key merge-on-write tables.
- Does this need documentation: No
@airborne12
airborne12 requested a review from yiguolei as a code owner August 26, 2026 06:55
@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?

@airborne12

Copy link
Copy Markdown
Member Author

run buildall

@yiguolei
yiguolei merged commit f42ebf2 into apache:branch-4.1 Aug 27, 2026
29 of 32 checks passed
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.

4 participants