Skip to content

Commit 7515a1f

Browse files
committed
Update to DataFusion 51 and Arrow 57
1 parent afcbd1c commit 7515a1f

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ readme = "README.md"
1111
repository = "https://github.com/datafusion-contrib/datafusion-federation"
1212

1313
[workspace.dependencies]
14-
arrow-json = "56"
14+
arrow-json = "57"
1515
async-stream = "0.3.5"
1616
async-trait = "0.1.83"
17-
datafusion = "50"
17+
datafusion = "51"
1818
datafusion-federation = { path = "./datafusion-federation", version = "0.4.2" }
1919
futures = "0.3.31"
2020
tokio = { version = "1.41", features = ["full"] }
2121

2222
[patch.crates-io]
23-
duckdb = { git = "https://github.com/spiceai/duckdb-rs.git", rev = "dd02045c3aa77895723e873222cbe30f5c8f77a9" } # spiceai-1.3.2
23+
duckdb = { git = "https://github.com/spiceai/duckdb-rs.git", rev = "2b2d90826ccba84435174e10c551dbdf3dae41f3" } # spiceai-57
2424

25-
datafusion = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
26-
datafusion-expr = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
27-
datafusion-physical-expr = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
28-
datafusion-physical-plan = { git = "https://github.com/spiceai/datafusion.git", rev = "cd6b2f85c4b1d9d0b450aacd7f3498a1dea48ec4" } # spiceai-50
25+
datafusion = { git = "https://github.com/apache/datafusion.git", rev = "606561070b2a9f702d5e36c6139eed21836c50bd" } # upstream:v51
26+
datafusion-expr = { git = "https://github.com/apache/datafusion.git", rev = "606561070b2a9f702d5e36c6139eed21836c50bd" } # upstream:v51
27+
datafusion-physical-expr = { git = "https://github.com/apache/datafusion.git", rev = "606561070b2a9f702d5e36c6139eed21836c50bd" } # upstream:v51
28+
datafusion-physical-plan = { git = "https://github.com/apache/datafusion.git", rev = "606561070b2a9f702d5e36c6139eed21836c50bd" } # upstream:v51
2929

30-
arrow = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
31-
arrow-buffer = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
32-
arrow-json = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
33-
arrow-ipc = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
34-
arrow-ord = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
35-
arrow-schema = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
36-
parquet = { git = "https://github.com/spiceai/arrow-rs.git", rev = "9f9c372ff5744488226462e3ea7d94ff47909833" } # spiceai-56
30+
arrow = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57
31+
arrow-buffer = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57
32+
arrow-json = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57
33+
arrow-ipc = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57
34+
arrow-ord = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57
35+
arrow-schema = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57
36+
parquet = { git = "https://github.com/spiceai/arrow-rs.git", rev = "122357d9232caa9d512e4dc58176c9152f19595b" } # spiceai-57

datafusion-federation/src/sql/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use analyzer::{collect_known_rewrites, RewriteTableScanAnalyzer};
1212
use ast_analyzer::{AstAnalyzer, RewriteMultiTableReference};
1313
use async_trait::async_trait;
1414
use datafusion::{
15+
common::DFSchema,
1516
arrow::datatypes::{Schema, SchemaRef},
1617
common::tree_node::TreeNode,
1718
config::ConfigOptions,
@@ -160,7 +161,7 @@ struct VirtualExecutionPlan {
160161

161162
impl VirtualExecutionPlan {
162163
pub fn new(plan: LogicalPlan, executor: Arc<dyn SQLExecutor>) -> Self {
163-
let schema: Schema = plan.schema().as_ref().into();
164+
let schema: Schema = <DFSchema as AsRef<Schema>>::as_ref(plan.schema().as_ref()).clone();
164165
let props = PlanProperties::new(
165166
EquivalenceProperties::new(Arc::new(schema)),
166167
Partitioning::UnknownPartitioning(1),
@@ -176,7 +177,7 @@ impl VirtualExecutionPlan {
176177

177178
fn schema(&self) -> SchemaRef {
178179
let df_schema = self.plan.schema().as_ref();
179-
Arc::new(Schema::from(df_schema))
180+
Arc::new(<DFSchema as AsRef<Schema>>::as_ref(df_schema).clone())
180181
}
181182

182183
fn final_sql(&self) -> Result<String> {
@@ -375,6 +376,7 @@ mod tests {
375376
use datafusion::sql::unparser::dialect::Dialect;
376377
use datafusion::sql::unparser::{self};
377378
use datafusion::{
379+
common::DFSchema,
378380
arrow::datatypes::{DataType, Field},
379381
datasource::TableProvider,
380382
execution::context::SessionContext,

0 commit comments

Comments
 (0)