mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 10:52:56 +00:00
Compare commits
1 Commits
codex/upda
...
codex/upda
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdd51532eb |
68
Cargo.lock
generated
68
Cargo.lock
generated
@@ -3086,8 +3086,8 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
||||
|
||||
[[package]]
|
||||
name = "fsst"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"rand 0.9.2",
|
||||
@@ -4422,8 +4422,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-arith",
|
||||
@@ -4488,8 +4488,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-arrow"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -4508,8 +4508,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-bitpacking"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"paste",
|
||||
@@ -4518,8 +4518,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-core"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -4556,8 +4556,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-datafusion"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -4587,8 +4587,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-datagen"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -4605,8 +4605,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-encoding"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-arith",
|
||||
"arrow-array",
|
||||
@@ -4643,8 +4643,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-file"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-arith",
|
||||
"arrow-array",
|
||||
@@ -4676,8 +4676,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-geo"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"datafusion",
|
||||
"geo-types",
|
||||
@@ -4688,8 +4688,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-index"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-arith",
|
||||
@@ -4751,8 +4751,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-io"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-arith",
|
||||
@@ -4792,8 +4792,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-linalg"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-buffer",
|
||||
@@ -4809,8 +4809,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-namespace"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"async-trait",
|
||||
@@ -4822,8 +4822,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-namespace-impls"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-ipc",
|
||||
@@ -4861,8 +4861,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-table"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow",
|
||||
"arrow-array",
|
||||
@@ -4901,8 +4901,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lance-testing"
|
||||
version = "2.0.0-beta.2"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
||||
version = "2.0.0-beta.1"
|
||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.1#29b17f83c39b1ceb1d902e3043fa027fc6637e30"
|
||||
dependencies = [
|
||||
"arrow-array",
|
||||
"arrow-schema",
|
||||
|
||||
28
Cargo.toml
28
Cargo.toml
@@ -15,20 +15,20 @@ categories = ["database-implementations"]
|
||||
rust-version = "1.78.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
lance = { "version" = "=2.0.0-beta.2", default-features = false, "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-core = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datagen = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-file = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-io = { "version" = "=2.0.0-beta.2", default-features = false, "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-index = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-linalg = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace-impls = { "version" = "=2.0.0-beta.2", default-features = false, "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-table = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-testing = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datafusion = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-encoding = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-arrow = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance = { "version" = "=2.0.0-beta.1", default-features = false, "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-core = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datagen = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-file = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-io = { "version" = "=2.0.0-beta.1", default-features = false, "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-index = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-linalg = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-namespace-impls = { "version" = "=2.0.0-beta.1", default-features = false, "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-table = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-testing = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-datafusion = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-encoding = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
lance-arrow = { "version" = "=2.0.0-beta.1", "tag" = "v2.0.0-beta.1", "git" = "https://github.com/lance-format/lance.git" }
|
||||
ahash = "0.8"
|
||||
# Note that this one does not include pyarrow
|
||||
arrow = { version = "56.2", optional = false }
|
||||
|
||||
@@ -326,11 +326,11 @@ impl Connection {
|
||||
let py = self_.py();
|
||||
future_into_py(py, async move {
|
||||
use lance_namespace::models::CreateNamespaceRequest;
|
||||
let mode_enum = mode.and_then(|m| match m.to_lowercase().as_str() {
|
||||
"create" => Some("Create".to_string()),
|
||||
"exist_ok" => Some("ExistOk".to_string()),
|
||||
"overwrite" => Some("Overwrite".to_string()),
|
||||
_ => None,
|
||||
let mode_enum = mode.map(|m| match m.to_lowercase().as_str() {
|
||||
"create" => "Create".to_string(),
|
||||
"exist_ok" => "ExistOk".to_string(),
|
||||
"overwrite" => "Overwrite".to_string(),
|
||||
_ => m,
|
||||
});
|
||||
let request = CreateNamespaceRequest {
|
||||
id: if namespace.is_empty() {
|
||||
@@ -361,15 +361,15 @@ impl Connection {
|
||||
let py = self_.py();
|
||||
future_into_py(py, async move {
|
||||
use lance_namespace::models::DropNamespaceRequest;
|
||||
let mode_enum = mode.and_then(|m| match m.to_uppercase().as_str() {
|
||||
"SKIP" => Some("Skip".to_string()),
|
||||
"FAIL" => Some("Fail".to_string()),
|
||||
_ => None,
|
||||
let mode_enum = mode.map(|m| match m.to_lowercase().as_str() {
|
||||
"skip" => "Skip".to_string(),
|
||||
"fail" => "Fail".to_string(),
|
||||
_ => m,
|
||||
});
|
||||
let behavior_enum = behavior.and_then(|b| match b.to_uppercase().as_str() {
|
||||
"RESTRICT" => Some("Restrict".to_string()),
|
||||
"CASCADE" => Some("Cascade".to_string()),
|
||||
_ => None,
|
||||
let behavior_enum = behavior.map(|b| match b.to_lowercase().as_str() {
|
||||
"restrict" => "Restrict".to_string(),
|
||||
"cascade" => "Cascade".to_string(),
|
||||
_ => b,
|
||||
});
|
||||
let request = DropNamespaceRequest {
|
||||
id: if namespace.is_empty() {
|
||||
|
||||
@@ -208,7 +208,7 @@ impl Database for LanceNamespaceDatabase {
|
||||
let describe_request = DescribeTableRequest {
|
||||
id: Some(table_id.clone()),
|
||||
version: None,
|
||||
with_table_uri: Some(true),
|
||||
with_table_uri: None,
|
||||
};
|
||||
|
||||
let describe_result = self.namespace.describe_table(describe_request).await;
|
||||
@@ -335,7 +335,7 @@ impl Database for LanceNamespaceDatabase {
|
||||
let describe_request = DescribeTableRequest {
|
||||
id: Some(table_id.clone()),
|
||||
version: None,
|
||||
with_table_uri: Some(true),
|
||||
with_table_uri: None,
|
||||
};
|
||||
let response = self
|
||||
.namespace
|
||||
|
||||
@@ -4956,13 +4956,9 @@ mod tests {
|
||||
assert_eq!(ns_request.k, 10);
|
||||
assert_eq!(ns_request.offset, Some(5));
|
||||
assert_eq!(ns_request.filter, Some("id > 0".to_string()));
|
||||
assert_eq!(
|
||||
ns_request.columns,
|
||||
Some(Box::new(QueryTableRequestColumns {
|
||||
column_names: Some(vec!["id".to_string()]),
|
||||
column_aliases: None,
|
||||
}))
|
||||
);
|
||||
let columns = ns_request.columns.as_ref().unwrap();
|
||||
assert_eq!(columns.column_names, Some(vec!["id".to_string()]));
|
||||
assert!(columns.column_aliases.is_none());
|
||||
assert_eq!(ns_request.vector_column, Some("vector".to_string()));
|
||||
assert_eq!(ns_request.distance_type, Some("l2".to_string()));
|
||||
assert!(ns_request.vector.single_vector.is_some());
|
||||
@@ -5003,13 +4999,9 @@ mod tests {
|
||||
assert_eq!(ns_request.k, 20);
|
||||
assert_eq!(ns_request.offset, Some(5));
|
||||
assert_eq!(ns_request.filter, Some("id > 5".to_string()));
|
||||
assert_eq!(
|
||||
ns_request.columns,
|
||||
Some(Box::new(QueryTableRequestColumns {
|
||||
column_names: Some(vec!["id".to_string()]),
|
||||
column_aliases: None,
|
||||
}))
|
||||
);
|
||||
let columns = ns_request.columns.as_ref().unwrap();
|
||||
assert_eq!(columns.column_names, Some(vec!["id".to_string()]));
|
||||
assert!(columns.column_aliases.is_none());
|
||||
assert_eq!(ns_request.with_row_id, Some(true));
|
||||
assert_eq!(ns_request.bypass_vector_index, Some(true));
|
||||
assert!(ns_request.vector_column.is_none()); // No vector column for plain queries
|
||||
|
||||
Reference in New Issue
Block a user