feat: add count_table_rows, insert_into_table, query_table for DirectoryNamespace#6132
feat: add count_table_rows, insert_into_table, query_table for DirectoryNamespace#6132XuQianJin-Stars wants to merge 5 commits intolance-format:mainfrom
Conversation
eb5404d to
cb74abf
Compare
PR ReviewP0:
|
cb74abf to
cf62c9d
Compare
6085325 to
5e24dff
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
yanghua
left a comment
There was a problem hiding this comment.
@XuQianJin-Stars Thanks for the contribution. Left two minor comments.
|
|
||
| let mode = match request.mode.as_deref() { | ||
| Some(m) if m.eq_ignore_ascii_case("overwrite") => lance::dataset::WriteMode::Overwrite, | ||
| _ => lance::dataset::WriteMode::Append, |
There was a problem hiding this comment.
To be more seriously, we may need to enumale the mode more carefully. For example, if it is not append, we need to throw an exception?
| .nearest( | ||
| request.vector_column.as_deref().unwrap_or("vector"), | ||
| &query_array, | ||
| request.k as usize, |
There was a problem hiding this comment.
Check the k arg? Should it be larger than 0?
60c499c to
1a2e984
Compare
…oryNamespace Implement three new table operation methods on DirectoryNamespace: - count_table_rows: count rows with optional version checkout and predicate filter - insert_into_table: write Arrow IPC batches in append or overwrite mode - query_table: vector similarity search or plain scan with filter/limit/offset/version Add lance-linalg as a dependency for DistanceType in vector search. Include 8 unit tests covering all new methods and edge cases.
1a2e984 to
9c8f82b
Compare
close #6111
count_table_rowswith optional version checkout and predicate filterinsert_into_tablewith append/overwrite modes via Arrow IPCquery_tablesupporting vector similarity search (with distance type, nprobes, refine factor, prefilter) and plain scan with filter/limit/offset/versionlance-linalgdependency forDistanceTypein vector searchTest plan
cargo test -p lance-namespace-implspasses all new tests