morningman opened a new pull request, #71113:
URL: https://github.com/apache/doris/pull/71113

   ### Background
   
   `vector_search` over a Lance catalog (#70971) plans one split per segment of 
an index over the searched column when the index was built with the requested 
metric, and a flat search for the fragments no segment covers. A multi-vector 
column is searched with a matrix of query vectors. The Lance regression suites 
read a Directory catalog that the External pipeline mirrors into MinIO from 
`docker/thirdparties/docker-compose/iceberg/scripts/preinstalled_data/lance`; 
`lance_build_predicate_pushdown.py` writes its `__manifest`.
   
   ### What problem does this PR solve?
   
   Issue Number: #70970
   Related PR: #66512, #66779, #67039, #68028, #68813 (the branch-4.x suites, 
fixtures and generators this ports), #70971 (the search functions these suites 
cover)
   PR Type: Test
   
   Problem Summary:
   
   #70971 brought `vector_search` and `full_text_search` to master with the 
branch-4.2 suites that read small fixtures, so master's suites search IVF_PQ 
and IVF_FLAT indexes with L2 only, and no multi-vector column. This PR ports 
the rest of branch-4.2's coverage: seven suites for the other index algorithms, 
cosine and dot indexes, indexed Float64, Float16 and UInt8 vectors, a 44-cell 
index matrix and multi-vector columns. It adds the 18 datasets they read, 
copied unchanged (5.1 MB, largest file 331 KB), and the two branch-4.2 
generators that built them. Nothing outside the tests and their fixtures 
changes.
   
   ### Details
   
   - **Change map:** all 3,603 added lines are tests and their fixtures, in two 
commits. (1) Fixtures: 285 binary dataset files, the rebuilt `__manifest`, 11 
new entries in `COMMITTED_TABLES`, and the generators 
`lance_build_preinstalled_catalog.py` (1,603 lines, adapted) and 
`lance_build_multivector.py` (237 lines, unchanged). (2) Suites: 1,508 lines of 
Groovy and 219 lines of generated `.out`.
   - **Scenarios:** IVF_SQ and IVF_HNSW_FLAT/SQ/PQ with `nprobes`, `ef` and 
refinement; IVF_FLAT's full probe equal to the flat search; cosine and dot 
indexes used only for their own metric; Float64, Float16 and UInt8 vectors 
through an index; 44 element type x metric x algorithm cells, each reaching an 
indexed plan and matching an exhaustive scan when refined; multi-vector columns 
against an oracle computed in the suite, with null and empty rows, offsets past 
the last row, prefilter, lazy materialization and invalid input.
   - **What existing tests miss:** the search suites on master read one IVF_PQ 
and one IVF_FLAT table with L2. None reads a cosine, dot or graph index, an 
indexed non-Float32 vector or a multi-vector column; `LanceSearchPlannerTest` 
covers index selection on metadata only.
   - **Fails when broken:** with the Lance plugin's classes changed on a 
running FE, never using an index (a silent flat fallback) fails all 7 suites; 
using an index whatever its metric fails `_metrics` and 
`_indexed_element_types`; keeping only the first subvector of a multi-vector 
query fails both multi-vector suites.
   - **External dependencies:** the External pipeline's iceberg compose (MinIO 
with this fixture at `s3://warehouse/lance`), as for the other Lance suites; no 
new image or service.
   
   ### Testing
   
   - All 24 suites in `external_table_p0/lance` pass locally at this PR's head, 
with a read-only S3 server standing in for MinIO. The FE was built from master 
d97993b7256; the BE from #70971's branch before its rebases, on base 
141d3212aab, and none of the 76 BE files master has changed since then is in 
the Lance reader.
   - The `.out` files were generated with `-forceGenOut` and checked against 
the closed-form distances and against the distances pylance reports in the 
generator's self-check. Three equal branch-4.2's byte for byte; `_metrics` 
differs in two FLOAT cells of its IVF_FLAT cosine block by 3e-7 relative, 
inside the framework's tolerance, and also passes against branch-4.2's file.
   - `lance_build_preinstalled_catalog.py --check` passes on the committed 
datasets, and a rebuild into a copy of the catalog root replaced only the 
generator's 22 datasets and left the registrations valid.
   
   ### Notes for Reviewers
   
   - Original authors of the ported suites, datasets and generators: @FANNG1 
(#66512, #66779, #67039), @Gabriel39 (#68028) and @zhangstar333 (#68813).
   - The datasets have branch-4.2's git tree ids, and the suites are 
branch-4.2's except three comments that named branch-4.2 classes or an Int8 
note #70971 removed. The generator is the part worth reviewing.
   - Why the generator changed: on branch-4.2 it rebuilt the whole catalog, 
`__manifest` included, and replaced the fixture directory, which on master 
would delete `predicate_pushdown`, `column_case*` and their registrations. It 
now builds in a throwaway staging catalog, self-checks there, and moves each 
dataset into the directory `COMMITTED_TABLES` names, where `__manifest` already 
registers it. Builders for datasets master lacks (`nested_index`, time travel, 
search snapshots) or builds elsewhere are left out.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No
   - Does this need documentation: No
   - Pre-submission status: Partially verified: not run on the External 
pipeline's MinIO, and the local BE predates master's latest BE changes, none of 
which is in the Lance reader
   
   ### AI Disclosure
   
   - Tool: Claude Code (Claude Opus 5.5)
   - Generated: the generator adaptation, the registration entries, three suite 
comments and this description; the suites, datasets and 
`lance_build_multivector.py` are copied from branch-4.2
   - Human review: not stated
   - Prompts: The author approved a two-PR port of branch-4.2's Lance search 
functions, the second carrying the coverage suites with the large fixtures 
copied unchanged, `__manifest` written by master's registration script and the 
branch-4.2 generators brought along without the part that writes it; after 
#70971 merged, the author asked to continue with this PR.
   


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

Reply via email to