Skip to content

Commit 2064c60

Browse files
authored
Upgrade datafusion to version 49, datafusion-federation to version 0.4.7 (#407)
1 parent e56af46 commit 2064c60

15 files changed

Lines changed: 260 additions & 225 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ arrow-ipc = { version = "55.0.0" }
3838
arrow-schema = { version = "55.2.0", features = ["serde"] }
3939
arrow-json = "55.0.0"
4040
arrow-odbc = { version = "16.0.2" }
41-
datafusion = { version = "48", default-features = false }
42-
datafusion-expr = { version = "48" }
43-
datafusion-federation = { version = "0.4.6" }
44-
datafusion-ffi = { version = "48" }
45-
datafusion-proto = { version = "48" }
46-
datafusion-physical-expr = { version = "48" }
47-
datafusion-physical-plan = { version = "48" }
41+
datafusion = { version = "49", default-features = false }
42+
datafusion-expr = { version = "49" }
43+
datafusion-federation = { version = "0.4.7" }
44+
datafusion-ffi = { version = "49" }
45+
datafusion-proto = { version = "49" }
46+
datafusion-physical-expr = { version = "49" }
47+
datafusion-physical-plan = { version = "49" }
4848
datafusion-table-providers = { path = "core" }
4949
duckdb = { version = "=1.3.0", package = "spiceai_duckdb_fork" } # Forked to add support for duckdb_scan_arrow, pending: https://github.com/duckdb/duckdb-rs/pull/488

core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ num-bigint = "0.4"
6363
odbc-api = { version = "13.0", optional = true }
6464
pem = { version = "3.0.4", optional = true }
6565
postgres-native-tls = { version = "0.5.0", optional = true }
66-
prost = { version = "0.14", optional = true }
66+
prost = { version = "0.13.5", optional = true }
6767
rand = { version = "0.9" }
6868
regex = { version = "1" }
6969
r2d2 = { version = "0.8", optional = true }
@@ -105,7 +105,7 @@ anyhow = "1.0"
105105
bollard = "0.19"
106106
geozero = { version = "0.14.0", features = ["with-wkb"] }
107107
insta = { version = "1.43.1", features = ["filters"] }
108-
prost = { version = "0.14" }
108+
prost = { version = "0.13.5" }
109109
rand = "0.9"
110110
reqwest = "0.12"
111111
rstest = "0.25.0"

core/src/clickhouse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl ClickHouseTableFactory {
5353
args,
5454
self.pool.clone(),
5555
schema,
56-
Constraints::empty(),
56+
Constraints::default(),
5757
));
5858

5959
#[cfg(feature = "clickhouse-federation")]

core/src/duckdb.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ pub enum Error {
161161
#[snafu(display("Failed to register Arrow scan view for DuckDB ingestion: {source}"))]
162162
UnableToRegisterArrowScanView { source: duckdb::Error },
163163

164-
#[snafu(display("Failed to register Arrow scan view to build table creation statement: {source}"))]
164+
#[snafu(display(
165+
"Failed to register Arrow scan view to build table creation statement: {source}"
166+
))]
165167
UnableToRegisterArrowScanViewForTableCreation { source: duckdb::Error },
166168

167169
#[snafu(display("Failed to drop Arrow scan view for DuckDB ingestion: {source}"))]
@@ -717,7 +719,7 @@ pub(crate) mod tests {
717719
order_exprs: vec![],
718720
unbounded: false,
719721
options,
720-
constraints: Constraints::empty(),
722+
constraints: Constraints::default(),
721723
column_defaults: HashMap::new(),
722724
temporary: false,
723725
};
@@ -778,7 +780,7 @@ pub(crate) mod tests {
778780
order_exprs: vec![],
779781
unbounded: false,
780782
options,
781-
constraints: Constraints::empty(),
783+
constraints: Constraints::default(),
782784
column_defaults: HashMap::new(),
783785
temporary: false,
784786
};
@@ -835,7 +837,7 @@ pub(crate) mod tests {
835837
order_exprs: vec![],
836838
unbounded: false,
837839
options,
838-
constraints: Constraints::empty(),
840+
constraints: Constraints::default(),
839841
column_defaults: HashMap::new(),
840842
temporary: false,
841843
};
@@ -890,7 +892,7 @@ pub(crate) mod tests {
890892
order_exprs: vec![],
891893
unbounded: false,
892894
options,
893-
constraints: Constraints::empty(),
895+
constraints: Constraints::default(),
894896
column_defaults: HashMap::new(),
895897
temporary: false,
896898
};
@@ -948,7 +950,7 @@ pub(crate) mod tests {
948950
order_exprs: vec![],
949951
unbounded: false,
950952
options,
951-
constraints: Constraints::empty(),
953+
constraints: Constraints::default(),
952954
column_defaults: HashMap::new(),
953955
temporary: false,
954956
};

core/src/duckdb/creator.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,8 @@ impl TableManager {
409409
tx.register_arrow_scan_view(&view_name, &stream)
410410
.context(super::UnableToRegisterArrowScanViewForTableCreationSnafu)?;
411411

412-
let sql = format!(
413-
r#"CREATE TABLE IF NOT EXISTS "{table_name}" AS SELECT * FROM "{view_name}""#,
414-
);
412+
let sql =
413+
format!(r#"CREATE TABLE IF NOT EXISTS "{table_name}" AS SELECT * FROM "{view_name}""#,);
415414
tracing::debug!("{sql}");
416415

417416
tx.execute(&sql, [])

core/src/mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl MySQLTableFactory {
152152
table_name,
153153
Arc::clone(&self.pool),
154154
schema,
155-
Constraints::empty(),
155+
Constraints::default(),
156156
);
157157

158158
Ok(MySQLTableWriter::create(read_provider, mysql, None))

core/src/postgres.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl PostgresTableFactory {
179179
table_reference,
180180
Arc::clone(&self.pool),
181181
schema,
182-
Constraints::empty(),
182+
Constraints::default(),
183183
);
184184

185185
Ok(PostgresTableWriter::create(read_provider, postgres, None))

core/src/sql/db_connection_pool/sqlitepool.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ mod tests {
291291
assert!(pool.mode == Mode::File);
292292
assert_eq!(pool.path, db_name.clone().into());
293293

294-
drop(pool);
294+
pool.conn.close().await.unwrap();
295295

296296
// cleanup
297297
std::fs::remove_file(&db_name).unwrap();
@@ -324,7 +324,7 @@ mod tests {
324324
assert!(pool.mode == Mode::File);
325325
assert_eq!(pool.path, db_names[0].clone().into());
326326

327-
drop(pool);
327+
pool.conn.close().await.unwrap();
328328

329329
// cleanup
330330
for db in &db_names {
@@ -345,7 +345,7 @@ mod tests {
345345
assert!(pool.mode == Mode::File);
346346
assert_eq!(pool.path, db_name.clone().into());
347347

348-
drop(pool);
348+
pool.conn.close().await.unwrap();
349349

350350
// cleanup
351351
std::fs::remove_file(&db_name).unwrap();
@@ -365,7 +365,7 @@ mod tests {
365365
assert!(pool.mode == Mode::Memory);
366366
assert_eq!(pool.path, "./test.sqlite".into());
367367

368-
drop(pool);
368+
pool.conn.close().await.unwrap();
369369

370370
// in memory mode, attachments are not created and nothing happens
371371
assert!(std::fs::metadata("./test.sqlite").is_err());

core/src/sqlite/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ mod tests {
290290
order_exprs: vec![],
291291
unbounded: false,
292292
options: HashMap::new(),
293-
constraints: Constraints::empty(),
293+
constraints: Constraints::default(),
294294
column_defaults: HashMap::default(),
295295
temporary: false,
296296
};

0 commit comments

Comments
 (0)