Skip to content

Commit

Permalink
chore: adopt new datafusion crate
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler committed Sep 18, 2024
1 parent 8bc0011 commit d4bfacd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
7 changes: 4 additions & 3 deletions crates/core/src/delta_datafusion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -702,7 +703,7 @@ impl TableProvider for DeltaTable {
None
}

fn get_logical_plan(&self) -> Option<&LogicalPlan> {
fn get_logical_plan(&self) -> Option<Cow<'_, LogicalPlan>> {
None
}

Expand Down Expand Up @@ -791,7 +792,7 @@ impl TableProvider for DeltaTableProvider {
None
}

fn get_logical_plan(&self) -> Option<&LogicalPlan> {
fn get_logical_plan(&self) -> Option<Cow<'_, LogicalPlan>> {
None
}

Expand Down Expand Up @@ -1766,9 +1767,9 @@ impl From<Column> 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;
Expand Down
1 change: 1 addition & 0 deletions crates/core/tests/command_merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit d4bfacd

Please sign in to comment.