Skip to content

branch-41: [chore](lance) update the thridparty about lance-c version - #66786

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
zhangstar333:branch-4.1-lance-version
Aug 15, 2026
Merged

branch-41: [chore](lance) update the thridparty about lance-c version #66786
yiguolei merged 1 commit into
apache:branch-4.1from
zhangstar333:branch-4.1-lance-version

Conversation

@zhangstar333

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

cherry-pick from master #66698

Release note

None

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
  • 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

@zhangstar333
zhangstar333 requested a review from yiguolei as a code owner August 14, 2026 14:15
@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?

@zhangstar333

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 58.86% (25182/42786)
Line Coverage 43.29% (256406/592232)
Region Coverage 39.31% (202924/516167)
Branch Coverage 40.82% (93645/229388)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.93% (30825/41697)
Line Coverage 58.04% (341163/587783)
Region Coverage 54.96% (284413/517474)
Branch Coverage 55.86% (127996/229118)

@yiguolei
yiguolei merged commit aafe2a3 into apache:branch-4.1 Aug 15, 2026
28 of 33 checks passed
FANNG1 added a commit to FANNG1/doris that referenced this pull request Aug 17, 2026
Issue Number: Part of apache#66495

The vector_search() path is algorithm-agnostic - the BE forwards metric, nprobes,
refine_factor and ef to lance-c and lets Lance choose the index - but the only
algorithm it has ever been exercised against is IVF_PQ (apache#66779). Nothing in the
repository could say whether Doris reads an IVF_FLAT, IVF_SQ or graph index at all,
so five of the six entries on the issue checklist rested on an argument about the
code path rather than on a test.

Extend the committed fixture with one table per remaining algorithm and add the
suites that query them:

- lance_build_preinstalled_catalog.py gains five VECTOR_TABLES entries -
  vs_ivf_flat_f32, vs_ivf_sq_f32, vs_ivf_hnsw_flat_f32, vs_ivf_hnsw_sq_f32 and
  vs_ivf_hnsw_pq_f32 - each carrying one index of its own algorithm over the same
  1024-row, two-fragment, 16-dim Float32 data the IVF_PQ table already uses, so a
  table is exactly one cell of the algorithm matrix. The self-check verifies every
  index the same way it verified IVF_PQ: exactly one index of the expected type and
  name, covering every fragment, ANNSubIndex and ANNIvfPartition in the indexed plan,
  KNNVectorDistance and no ANN node in the flat plan, and the row-256 nprobes=1
  discriminator that fails if a query silently falls back to a flat scan.
- Only IVF_FLAT gets its indexed-equals-flat equality asserted, since it stores the
  original vectors and a full-partition probe is an exhaustive scan by another name.
  IVF_SQ, IVF_HNSW_* and IVF_PQ quantize or traverse a graph, so their agreement with
  the flat search is recorded, never asserted, and their queries use refine_factor.
- The graph indexes need a second discriminator, because nprobes alone cannot show
  that ef reached the index. Measured on this data, a query at row 512 loses a true
  neighbour at ef=5 that ef=50 finds - but only on IVF_HNSW_SQ; on 1024 collinear
  vectors the FLAT and PQ graphs still return the exact rows at ef=5. The generator
  therefore asserts the ef discriminator on the one table that can carry it, records
  it for the others, and the suite queries that same table.
- BOUNDARY_TOP_K makes the generator probe the boundary at the k the suites actually
  use. It checked k=10 while the suites query k=9, so a retrained index could have
  passed the generator and failed the suites.

test_lance_vector_search_ivf_flat asserts the IVF_FLAT guarantee against Doris at both
ends of the dataset; test_lance_vector_search_index_types covers the other four with
per-table nprobes=1 discriminators, the ef pair, and the "ef must be greater than or
equal to k" error a too-narrow refined graph query must keep producing.

The writer pin stays at pylance 4.0.1, now with the evidence that matters after apache#66786
moved branch-4.1 to lance-c v0.1.6: pylance 7.0.0 - the Lance generation the BE reads
through v0.1.6 - reproduces the generator self-check line for line on all six tables,
and all 35 queries these three suites issue return identical rows and distances under
both. The goldens therefore depend on the frozen fixture bytes, not on which Lance
version reads them.

Claude-Session: https://claude.ai/code/session_01BQAjAdyfr5Rr94WA4WE45S
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.

3 participants