From d4bfacd015c5a056aa598fa659a68633fe29468f Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Tue, 3 Sep 2024 14:36:45 +0000 Subject: [PATCH] chore: adopt new datafusion crate --- Cargo.toml | 18 +++++++++--------- crates/core/src/delta_datafusion/mod.rs | 7 ++++--- crates/core/tests/command_merge.rs | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 88121f0e08..fbd9eedd06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,15 +45,15 @@ object_store = { version = "0.11" } parquet = { version = "53" } # datafusion -datafusion = { version = "41" } -datafusion-expr = { version = "41" } -datafusion-common = { version = "41" } -datafusion-proto = { version = "41" } -datafusion-sql = { version = "41" } -datafusion-physical-expr = { version = "41" } -datafusion-physical-plan = { version = "41" } -datafusion-functions = { version = "41" } -datafusion-functions-aggregate = { version = "41" } +datafusion = { version = "42" } +datafusion-expr = { version = "42" } +datafusion-common = { version = "42" } +datafusion-proto = { version = "42" } +datafusion-sql = { version = "42" } +datafusion-physical-expr = { version = "42" } +datafusion-physical-plan = { version = "42" } +datafusion-functions = { version = "42" } +datafusion-functions-aggregate = { version = "42" } # serde serde = { version = "1.0.194", features = ["derive"] } diff --git a/crates/core/src/delta_datafusion/mod.rs b/crates/core/src/delta_datafusion/mod.rs index 09d1e88412..4b75ed9245 100644 --- a/crates/core/src/delta_datafusion/mod.rs +++ b/crates/core/src/delta_datafusion/mod.rs @@ -21,6 +21,7 @@ //! ``` use std::any::Any; +use std::borrow::Cow; use std::collections::{HashMap, HashSet}; use std::fmt::{self, Debug}; use std::sync::Arc; @@ -702,7 +703,7 @@ impl TableProvider for DeltaTable { None } - fn get_logical_plan(&self) -> Option<&LogicalPlan> { + fn get_logical_plan(&self) -> Option> { None } @@ -791,7 +792,7 @@ impl TableProvider for DeltaTableProvider { None } - fn get_logical_plan(&self) -> Option<&LogicalPlan> { + fn get_logical_plan(&self) -> Option> { None } @@ -1766,9 +1767,9 @@ impl From for DeltaColumn { #[cfg(test)] mod tests { + use arrow::datatypes::DataType; use arrow_array::StructArray; use arrow_schema::Schema; - use arrow::datatypes::DataType; use chrono::{TimeZone, Utc}; use datafusion::assert_batches_sorted_eq; use datafusion::datasource::physical_plan::ParquetExec; diff --git a/crates/core/tests/command_merge.rs b/crates/core/tests/command_merge.rs index 783c858750..7b4c3aad01 100644 --- a/crates/core/tests/command_merge.rs +++ b/crates/core/tests/command_merge.rs @@ -173,6 +173,7 @@ async fn test_merge_different_range() { let (_table_ref1, _metrics) = merge(table_ref1, df1, expr.clone()).await.unwrap(); let result = merge(table_ref2, df2, expr).await; + println!("{result:#?}"); assert!(result.is_ok()); }