Skip to content

Commit 8de2a6a

Browse files
committed
feat: update to DataFusion 50, pyo3 24, pyo3-arrow 0.11
Signed-off-by: Andrew Lamb <[email protected]>
1 parent 0ca1a3b commit 8de2a6a

File tree

9 files changed

+46
-32
lines changed

9 files changed

+46
-32
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions-rs/toolchain@v1
4040
with:
4141
profile: default
42-
toolchain: "1.85"
42+
toolchain: "1.86"
4343
override: true
4444

4545
- uses: Swatinem/rust-cache@v2
@@ -91,7 +91,7 @@ jobs:
9191
uses: actions-rs/toolchain@v1
9292
with:
9393
profile: default
94-
toolchain: "1.85"
94+
toolchain: "1.86"
9595
override: true
9696

9797
- uses: Swatinem/rust-cache@v2
@@ -132,7 +132,7 @@ jobs:
132132
uses: actions-rs/toolchain@v1
133133
with:
134134
profile: default
135-
toolchain: "1.85"
135+
toolchain: "1.86"
136136
override: true
137137

138138
- uses: Swatinem/rust-cache@v2
@@ -194,7 +194,7 @@ jobs:
194194
uses: actions-rs/toolchain@v1
195195
with:
196196
profile: default
197-
toolchain: "1.85"
197+
toolchain: "1.86"
198198
override: true
199199

200200
- uses: Swatinem/rust-cache@v2
@@ -241,7 +241,7 @@ jobs:
241241
uses: actions-rs/toolchain@v1
242242
with:
243243
profile: default
244-
toolchain: "1.85"
244+
toolchain: "1.86"
245245
override: true
246246

247247
- uses: Swatinem/rust-cache@v2
@@ -300,7 +300,7 @@ jobs:
300300
uses: actions-rs/toolchain@v1
301301
with:
302302
profile: default
303-
toolchain: "1.85"
303+
toolchain: "1.86"
304304
override: true
305305

306306
- uses: Swatinem/rust-cache@v2

Cargo.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resolver = "2"
55

66
[workspace.package]
77
authors = ["Qingping Hou <[email protected]>"]
8-
rust-version = "1.85"
8+
rust-version = "1.86"
99
keywords = ["deltalake", "delta", "datalake"]
1010
readme = "README.md"
1111
edition = "2021"
@@ -26,32 +26,32 @@ debug = true
2626
debug = "line-tables-only"
2727

2828
[workspace.dependencies]
29-
delta_kernel = { version = "0.15.1", features = [
30-
"arrow-55",
29+
delta_kernel = { version = "0.15.2", features = [
30+
"arrow-56",
3131
"default-engine-rustls",
3232
"internal-api",
3333
] }
3434

3535

3636
# arrow
37-
arrow = { version = "55.2.0" }
38-
arrow-arith = { version = "55.2.0" }
39-
arrow-array = { version = "55.2.0", features = ["chrono-tz"] }
40-
arrow-buffer = { version = "55.2.0" }
41-
arrow-cast = { version = "55.2.0" }
42-
arrow-ipc = { version = "55.2.0" }
43-
arrow-json = { version = "55.2.0" }
44-
arrow-ord = { version = "55.2.0" }
45-
arrow-row = { version = "55.2.0" }
46-
arrow-schema = { version = "55.2.0" }
47-
arrow-select = { version = "55.2.0" }
37+
arrow = { version = "56.0.0" }
38+
arrow-arith = { version = "56.0.0" }
39+
arrow-array = { version = "56.0.0", features = ["chrono-tz"] }
40+
arrow-buffer = { version = "56.0.0" }
41+
arrow-cast = { version = "56.0.0" }
42+
arrow-ipc = { version = "56.0.0" }
43+
arrow-json = { version = "56.0.0" }
44+
arrow-ord = { version = "56.0.0" }
45+
arrow-row = { version = "56.0.0" }
46+
arrow-schema = { version = "56.0.0" }
47+
arrow-select = { version = "56.0.0" }
4848
object_store = { version = "0.12.1" }
49-
parquet = { version = "55.2.0" }
49+
parquet = { version = "56.0.0" }
5050

5151
# datafusion
52-
datafusion = "49.0.0"
53-
datafusion-ffi = "49.0.0"
54-
datafusion-proto = "49.0.0"
52+
datafusion = "50.0.0"
53+
datafusion-ffi = "50.0.0"
54+
datafusion-proto = "50.0.0"
5555

5656
# serde
5757
serde = { version = "1.0.194", features = ["derive"] }
@@ -93,4 +93,4 @@ arro3 = "arro3"
9393
Arro3 = "Arro3"
9494
AKS = "AKS"
9595
# to avoid using 'type' as a field name.
96-
tpe = "tpe"
96+
tpe = "tpe"

crates/core/src/delta_datafusion/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use crate::{DeltaResult, DeltaTableError};
5252

5353
/// This struct is like Datafusion's MakeArray but ensures that `element` is used rather than `item
5454
/// as the field name within the list.
55-
#[derive(Debug)]
55+
#[derive(Debug, Hash, PartialEq, Eq)]
5656
struct MakeParquetArray {
5757
/// The actual upstream UDF, which we're just totally cheating and using
5858
actual: MakeArray,

crates/core/src/delta_datafusion/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ pub(crate) fn get_null_of_arrow_type(t: &ArrowDataType) -> DeltaResult<ScalarVal
389389
)),
390390
//Unsupported types...
391391
ArrowDataType::Float16
392+
| ArrowDataType::Decimal32(_, _)
393+
| ArrowDataType::Decimal64(_, _)
392394
| ArrowDataType::Decimal256(_, _)
393395
| ArrowDataType::Union(_, _)
394396
| ArrowDataType::LargeList(_)
@@ -2185,10 +2187,10 @@ mod tests {
21852187
assert_eq!("a", small.iter().next().unwrap().unwrap());
21862188

21872189
let expected = vec![
2188-
ObjectStoreOperation::GetRange(LocationType::Data, 4952..4960),
2189-
ObjectStoreOperation::GetRange(LocationType::Data, 2399..4952),
2190+
ObjectStoreOperation::GetRange(LocationType::Data, 957..965),
2191+
ObjectStoreOperation::GetRange(LocationType::Data, 326..957),
21902192
#[expect(clippy::single_range_in_vec_init)]
2191-
ObjectStoreOperation::GetRanges(LocationType::Data, vec![4..58]),
2193+
ObjectStoreOperation::GetRanges(LocationType::Data, vec![4..46]),
21922194
];
21932195
let mut actual = Vec::new();
21942196
operations.recv_many(&mut actual, 3).await;

crates/core/src/kernel/scalars.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ impl ScalarExt for Scalar {
250250
))
251251
}
252252
Float16
253+
| Decimal32(_, _)
254+
| Decimal64(_, _)
253255
| Decimal256(_, _)
254256
| List(_)
255257
| LargeList(_)

crates/core/src/operations/optimize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ pub(super) mod zorder {
11111111
}
11121112

11131113
// DataFusion UDF impl for zorder_key
1114-
#[derive(Debug)]
1114+
#[derive(Debug, Hash, PartialEq, Eq)]
11151115
pub struct ZOrderUDF;
11161116

11171117
impl ScalarUDFImpl for ZOrderUDF {

python/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ doc = false
2020
[dependencies]
2121
delta_kernel.workspace = true
2222

23-
pyo3-arrow = { version = "0.9.0", default-features = false }
23+
pyo3-arrow = { version = "0.11.0", default-features = false }
2424

2525
# arrow
2626
arrow-schema = { workspace = true, features = ["serde"] }
@@ -63,7 +63,7 @@ jemallocator = { version = "0.5", features = [
6363
jemallocator = { version = "0.5", features = ["disable_initial_exec_tls"] }
6464

6565
[dependencies.pyo3]
66-
version = "0.24.0"
66+
version = "0.25.1"
6767
features = ["extension-module", "abi3", "abi3-py39"]
6868

6969
[dependencies.deltalake]

python/src/datafusion.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ mod tests {
175175
}
176176

177177
impl LazyBatchGenerator for TestBatchGenerator {
178+
fn as_any(&self) -> &dyn Any {
179+
self
180+
}
181+
178182
fn generate_next_batch(&mut self) -> DataFusionResult<Option<RecordBatch>> {
179183
if self.current_index < self.data.len() {
180184
let batch = self.data[self.current_index].clone();

python/src/writer.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! This module contains helper functions to create a LazyTableProvider from an ArrowArrayStreamReader
2+
3+
use std::any::Any;
24
use std::fmt::{self};
35
use std::sync::{Arc, Mutex};
46

@@ -66,6 +68,10 @@ impl ArrowStreamBatchGenerator {
6668
}
6769

6870
impl LazyBatchGenerator for ArrowStreamBatchGenerator {
71+
fn as_any(&self) -> &dyn Any {
72+
self
73+
}
74+
6975
fn generate_next_batch(
7076
&mut self,
7177
) -> deltalake::datafusion::error::Result<Option<deltalake::arrow::array::RecordBatch>> {

0 commit comments

Comments
 (0)