Skip to content

Commit d99e606

Browse files
authored
Merge pull request #273 from AdaWorldAPI/claude/lance-4-datafusion-52
feat: bump lance 2→4 + datafusion 51→52 + deltalake 0.30→0.31
2 parents 58c692a + 7f9a344 commit d99e606

8 files changed

Lines changed: 1297 additions & 1165 deletions

File tree

Cargo.lock

Lines changed: 1266 additions & 1141 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/holograph/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ arrow-array = "57"
3131
arrow-schema = "57"
3232
arrow-buffer = "57"
3333

34-
# Query engine — DataFusion 51
35-
datafusion = { version = "51", optional = true }
34+
# Query engine — DataFusion 52
35+
datafusion = { version = "52", optional = true }
3636

3737
# Lance columnar format — 100x faster random access than Parquet
38-
lance = { version = "2.0", optional = true, default-features = false }
38+
lance = { version = "4", optional = true, default-features = false }
3939

4040
# Async runtime
4141
tokio = { version = "1.49", features = ["rt-multi-thread", "macros"], optional = true }

crates/lance-graph-benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = "Benchmarks for lance-graph (not published)"
77

88
[dependencies]
99
lance-graph = { path = "../lance-graph", version = "0.5.3" }
10-
lance = "2"
10+
lance = "4"
1111
arrow-array = "57"
1212
arrow-schema = "57"
1313
criterion = { version = "0.5", features = ["async", "async_tokio", "html_reports"] }

crates/lance-graph-callcenter/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ lance-graph-contract = { path = "../lance-graph-contract" }
1212

1313
# [persist] — Arrow RecordBatch + Lance dataset ops
1414
arrow = { version = "57", optional = true }
15-
lance = { version = "2", optional = true }
15+
lance = { version = "4", optional = true }
1616

1717
# [query] / [query-lite] — DataFusion. Base dep has default-features = false.
1818
# The full `query` feature adds datafusion/default (compression backends etc).
1919
# The `query-lite` feature gets logical plan + optimizer without compression,
20-
# avoiding the xz2/liblzma `links = "lzma"` collision with lance v2.
21-
datafusion = { version = "51", optional = true, default-features = false, features = ["unicode_expressions"] }
20+
# avoiding the xz2/liblzma `links = "lzma"` collision (lance v2 era; may be
21+
# resolved with lance 4 + datafusion 52 — verify and remove if so).
22+
datafusion = { version = "52", optional = true, default-features = false, features = ["unicode_expressions"] }
2223

2324
# [realtime] — version watcher, Phoenix channel shapes, WebSocket
2425
tokio = { version = "1", features = ["sync"], optional = true }

crates/lance-graph-catalog/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ categories = ["database", "data-structures", "science"]
1313
[dependencies]
1414
arrow-schema = "57"
1515
async-trait = "0.1"
16-
datafusion = { version = "51", default-features = false }
17-
lance-namespace = "2"
16+
datafusion = { version = "52", default-features = false }
17+
lance-namespace = "4"
1818
reqwest = { version = "0.12", features = ["json"], optional = true }
1919
serde = { version = "1", features = ["derive"] }
2020
serde_json = "1"

crates/lance-graph-catalog/src/namespace/directory.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use async_trait::async_trait;
44
use lance_namespace::models::{DescribeTableRequest, DescribeTableResponse};
55
use lance_namespace::{Error as NamespaceError, LanceNamespace, Result};
6-
use snafu::location;
76

87
/// A namespace that resolves table names relative to a base directory or URI.
98
#[derive(Debug, Clone)]
@@ -39,7 +38,6 @@ impl LanceNamespace for DirNamespace {
3938
let id = request.id.ok_or_else(|| {
4039
NamespaceError::invalid_input(
4140
"DirNamespace requires the table identifier to be provided",
42-
location!(),
4341
)
4442
})?;
4543

@@ -49,7 +47,6 @@ impl LanceNamespace for DirNamespace {
4947
"DirNamespace expects identifiers with a single component, got {:?}",
5048
id
5149
),
52-
location!(),
5350
));
5451
}
5552

crates/lance-graph/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ arrow-array = "57"
1616
arrow-schema = "57"
1717
chrono = "0.4"
1818
async-trait = "0.1"
19-
datafusion = { version = "51", default-features = false, features = [
19+
datafusion = { version = "52", default-features = false, features = [
2020
"nested_expressions",
2121
"regex_expressions",
2222
"unicode_expressions",
@@ -26,21 +26,21 @@ datafusion = { version = "51", default-features = false, features = [
2626
"string_expressions",
2727
"parquet",
2828
] }
29-
datafusion-common = "51"
30-
datafusion-expr = "51"
31-
datafusion-sql = "51"
32-
datafusion-functions-aggregate = "51"
29+
datafusion-common = "52"
30+
datafusion-expr = "52"
31+
datafusion-sql = "52"
32+
datafusion-functions-aggregate = "52"
3333
futures = "0.3"
3434
lance-graph-catalog = { path = "../lance-graph-catalog", version = "0.5.4" }
3535
lance-graph-contract = { path = "../lance-graph-contract" }
36-
lance = "2"
37-
lance-linalg = "2"
38-
lance-namespace = "2"
36+
lance = "4"
37+
lance-linalg = "4"
38+
lance-namespace = "4"
3939
nom = "7.1"
4040
serde = { version = "1", features = ["derive"] }
4141
serde_json = "1"
4242
snafu = "0.8"
43-
deltalake = { version = "0.30", features = ["datafusion", "s3", "azure", "gcs"], optional = true }
43+
deltalake = { version = "0.31", features = ["datafusion", "s3", "azure", "gcs"], optional = true }
4444
url = { version = "2", optional = true }
4545

4646
# AdaWorldAPI/ndarray fork with 55 HPC modules (Fingerprint, CAM-PQ, CLAM, BLAS, ZeckF64)
@@ -72,7 +72,7 @@ tensor-codec = ["dep:bgz-tensor"]
7272

7373
[dev-dependencies]
7474
futures = "0.3"
75-
lance-arrow = "2"
76-
lance-index = "2"
75+
lance-arrow = "4"
76+
lance-index = "4"
7777
tempfile = "3"
7878
tokio = { version = "1.37", features = ["macros", "rt-multi-thread"] }

crates/lance-graph/src/table_readers.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,16 @@ impl TableReader for DeltaTableReader {
109109
))
110110
})?;
111111

112-
ctx.register_table(table_name, Arc::new(delta_table))
112+
let snapshot = delta_table.snapshot()
113+
.map_err(|e| CatalogError::Other(format!("Failed to get Delta snapshot: {e}")))?
114+
.snapshot()
115+
.clone();
116+
let log_store = delta_table.log_store();
117+
let scan_config = Default::default();
118+
let provider = deltalake::delta_datafusion::DeltaTableProvider::try_new(
119+
snapshot, log_store, scan_config,
120+
).map_err(|e| CatalogError::Other(format!("Failed to create DeltaTableProvider: {e}")))?;
121+
ctx.register_table(table_name, Arc::new(provider))
113122
.map_err(|e| {
114123
CatalogError::Other(format!(
115124
"Failed to register Delta table '{}': {}",

0 commit comments

Comments
 (0)