Skip to content

Commit 3f047bc

Browse files
Upgrade deltalake and df
1 parent e8cfcfa commit 3f047bc

8 files changed

Lines changed: 232 additions & 218 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ version = "0.2.2"
1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

1616
[dependencies]
17-
arrow-flight = { version = "54.1.0", features = [
17+
arrow-flight = { version = "54", features = [
1818
"flight-sql-experimental",
1919
], optional = true }
2020
axum = { version = "0.7.9", features = ["macros"], optional = true }
2121
clap = { version = "4.5.27", features = ["derive"] }
2222
color-eyre = "0.6.3"
2323
crossterm = { version = "0.28.1", features = ["event-stream"] }
24-
datafusion = { version = "45.0.0" }
24+
datafusion = { version = "46" }
2525
datafusion-app = { version = "0.1.0", path = "crates/datafusion-app" }
2626
directories = "5.0.1"
2727
env_logger = "0.11.5"
@@ -34,7 +34,7 @@ lazy_static = "1.4.0"
3434
log = "0.4.22"
3535
metrics = { version = "0.24.0", optional = true }
3636
metrics-exporter-prometheus = { version = "0.16.0", optional = true }
37-
parquet = "54.1.0"
37+
parquet = "54"
3838
pin-project-lite = { version = "0.2.14" }
3939
prost = "0.13.1"
4040
ratatui = "0.28.0"

crates/datafusion-app/Cargo.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,19 @@ version = "0.1.0"
66
# Leaving Hudi and Iceberg around in case traction on those picks up. It would be better if I just remove them from main and create PRs with the diff - maybe ill get around to that.
77

88
[dependencies]
9-
arrow-flight = { version = "54.1.0", features = [
9+
arrow-flight = { version = "54", features = [
1010
"flight-sql-experimental",
1111
], optional = true }
1212
async-trait = "0.1.80"
1313
base64 = { version = "0.22.1", optional = true }
1414
color-eyre = "0.6.3"
15-
datafusion = "45.0.0"
16-
datafusion-functions-json = { version = "0.45", optional = true }
17-
datafusion-functions-parquet = { version = "0.1.0", path = "..//datafusion-functions-parquet", optional = true }
15+
datafusion = "46"
16+
datafusion-functions-json = { version = "0.46", optional = true }
17+
datafusion-functions-parquet = { version = "0.1.0", path = "../datafusion-functions-parquet", optional = true }
1818
datafusion-udfs-wasm = { version = "0.1.0", path = "../datafusion-udfs-wasm", features = [
1919
"serde",
2020
], optional = true }
21-
deltalake = { git = "https://github.com/delta-io/delta-rs", rev = "d8995e64c305dc795f62d33ce2a4614b335944ff", features = [
22-
"datafusion",
23-
], optional = true }
21+
deltalake = { version = "0.25", features = ["datafusion"], optional = true }
2422
directories = "5.0.1"
2523
futures = "0.3.30"
2624
indexmap = { version = "2.8.0", features = ["serde"] }

crates/datafusion-app/src/stats.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// under the License.
1717

1818
use datafusion::{
19-
datasource::physical_plan::ParquetExec,
19+
datasource::{physical_plan::ParquetSource, source::DataSourceExec},
2020
physical_plan::{
2121
aggregates::AggregateExec,
2222
filter::FilterExec,
@@ -354,11 +354,19 @@ impl PlanIOVisitor {
354354
self.time_opening = metrics.sum_by_name("time_elapsed_opening");
355355
self.time_scanning = metrics.sum_by_name("time_elapsed_scanning_total");
356356

357-
if plan.as_any().downcast_ref::<ParquetExec>().is_some() {
358-
self.parquet_output_rows = metrics.output_rows();
359-
self.parquet_rg_pruned_stats = metrics.sum_by_name("row_groups_pruned_statistics");
360-
self.parquet_rg_matched_stats =
361-
metrics.sum_by_name("row_groups_matched_statistics");
357+
if let Some(data_source_exec) = plan.as_any().downcast_ref::<DataSourceExec>() {
358+
if data_source_exec
359+
.data_source()
360+
.as_any()
361+
.downcast_ref::<ParquetSource>()
362+
.is_some()
363+
{
364+
self.parquet_output_rows = metrics.output_rows();
365+
self.parquet_rg_pruned_stats =
366+
metrics.sum_by_name("row_groups_pruned_statistics");
367+
self.parquet_rg_matched_stats =
368+
metrics.sum_by_name("row_groups_matched_statistics");
369+
}
362370
}
363371
}
364372
}

crates/datafusion-functions-parquet/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/datafusion-contrib/datafusion-dft/tree/main/cra
1111
version = "0.1.0"
1212

1313
[dependencies]
14-
arrow = { version = "54.1.0" }
14+
arrow = { version = "54" }
1515
async-trait = "0.1.41"
16-
datafusion = { version = "45.0.0" }
17-
parquet = { version = "54.1.0", default-features = false }
16+
datafusion = { version = "46" }
17+
parquet = { version = "54", default-features = false }

crates/datafusion-functions-parquet/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ use async_trait::async_trait;
2323
use datafusion::catalog::Session;
2424
use datafusion::catalog::TableFunctionImpl;
2525
use datafusion::common::{plan_err, Column};
26+
use datafusion::datasource::memory::MemorySourceConfig;
2627
use datafusion::datasource::TableProvider;
2728
use datafusion::error::Result;
2829
use datafusion::logical_expr::Expr;
29-
use datafusion::physical_plan::memory::MemoryExec;
3030
use datafusion::physical_plan::ExecutionPlan;
3131
use datafusion::scalar::ScalarValue;
3232
use parquet::basic::ConvertedType;
@@ -51,7 +51,7 @@ impl TableProvider for ParquetMetadataTable {
5151
self
5252
}
5353

54-
fn schema(&self) -> datafusion::arrow::datatypes::SchemaRef {
54+
fn schema(&self) -> arrow::datatypes::SchemaRef {
5555
self.schema.clone()
5656
}
5757

@@ -66,11 +66,11 @@ impl TableProvider for ParquetMetadataTable {
6666
_filters: &[Expr],
6767
_limit: Option<usize>,
6868
) -> Result<Arc<dyn ExecutionPlan>> {
69-
Ok(Arc::new(MemoryExec::try_new(
69+
Ok(MemorySourceConfig::try_new_exec(
7070
&[vec![self.batch.clone()]],
7171
TableProvider::schema(self),
7272
projection.cloned(),
73-
)?))
73+
)?)
7474
}
7575
}
7676

@@ -183,7 +183,7 @@ impl TableFunctionImpl for ParquetMetadataFunc {
183183
Field::new("total_uncompressed_size", DataType::Int64, true),
184184
]));
185185

186-
// construct recordbatch from metadata
186+
// construct record batch from metadata
187187
let mut filename_arr = vec![];
188188
let mut row_group_id_arr = vec![];
189189
let mut row_group_num_rows_arr = vec![];

crates/datafusion-udfs-wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "datafusion-udfs-wasm"
44
version = "0.1.0"
55

66
[dependencies]
7-
datafusion = { version = "45.0.0", default-features = false }
7+
datafusion = { version = "46", default-features = false }
88
log = "0.4.25"
99
serde = { version = "1.0.217", optional = true }
1010
wasi-common = "29.0.1"

crates/datafusion-udfs-wasm/wasm-examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ version = "0.1.0"
77
crate-type = ["cdylib"]
88

99
[dependencies]
10-
arrow = "53"
10+
arrow = "54"

0 commit comments

Comments
 (0)