Skip to content

feat(ivfflat): add INCLUDE column support for IVF indexes - #24168

Merged
mergify[bot] merged 50 commits into
matrixorigin:mainfrom
iamlinjunhong:m-ivf-incl-col
Jul 27, 2026
Merged

feat(ivfflat): add INCLUDE column support for IVF indexes#24168
mergify[bot] merged 50 commits into
matrixorigin:mainfrom
iamlinjunhong:m-ivf-incl-col

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #24167

What this PR does / why we need it:

Add INCLUDE column support across IVF DDL, entries-table maintenance, planner rewrites, and ivf_search so covered vector queries can push include predicates and avoid base-table joins when mode=include.

Keep mode=post and mode=pre on their original single-round path, switch mode=include fallback from cumulative bucket expansion to non-overlapping bucket slices, reset per-input search round state, and collapse EXPLAIN ANALYZE background ivf_search plans by default while keeping capped verbose expansion.

Add parser, planner, ALTER, explain, unit, and distributed SQL coverage for the new INCLUDE behavior.

@matrix-meow matrix-meow added the size/XXL Denotes a PR that changes 2000+ lines label Apr 21, 2026

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep review on current head 313d2fd34e8b: the previously blocking INCLUDE rerank type mismatch is fixed. Both multi-round and exact-PK SQL builders now share the entry-type query encoder; bf16/f16 use matching literals, int8/uint8 apply the trained affine quantizer, and returned distances are restored to source scale. The new focused tests cover narrow and quantized builders plus the exact-PK Search path.

I rechecked catalog persistence and ALTER propagation, async DML/ISCP maintenance, planner filter/candidate-budget behavior, runtime-filter cancellation and single-CN placement, per-input cursor reset, round termination/bounds, remote operator serialization, and plugin-layering guards. No new blocking correctness, compatibility, lifecycle, or resource issue found.

Exact-head local tests passed for pkg/vectorindex/ivfflat, pkg/sql/colexec/table_function, pkg/sql/plan, pkg/sql/compile, and pkg/iscp; git diff --check and all index-plugin guard greps passed. Current GitHub checks are success/skipped/neutral with no failing check.

@mergify

mergify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-27 09:20 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • Checks passed · in-place
  • Merged2026-07-27 13:13 UTC · at 563fd972512a04ebfb539987464b8fca8dc8b178 · squash

This pull request spent 3 hours 53 minutes 34 seconds in the queue, including 41 minutes 4 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection] (documentation)
  • github-review-decision = APPROVED [🛡 GitHub branch protection] (documentation)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86

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

Labels

size/XXL Denotes a PR that changes 2000+ lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.