Skip to content

Commit 01834d7

Browse files
committed
chore: Update to DataFusion 49.0.0
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
1 parent 6a4f249 commit 01834d7

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ object_store = { version = "0.12.1" }
4747
parquet = { version = "55.2.0" }
4848

4949
# datafusion
50-
datafusion = "48.0.0"
51-
datafusion-ffi = "48.0.0"
52-
datafusion-proto = "48.0.0"
50+
datafusion = "49.0.0"
51+
datafusion-ffi = "49.0.0"
52+
datafusion-proto = "49.0.0"
5353

5454
# serde
5555
serde = { version = "1.0.194", features = ["derive"] }
@@ -94,3 +94,10 @@ Arro3 = "Arro3"
9494
AKS = "AKS"
9595
# to avoid using 'type' as a field name.
9696
tpe = "tpe"
97+
98+
# temp patch to https://github.com/apache/datafusion/pull/16822
99+
# before merge to branch-49
100+
[patch.crates-io]
101+
datafusion = { git = "https://github.com/apache/datafusion.git", rev = "fb02f4ec1d17f268ca7be9757fac121213c9bdc9" }
102+
datafusion-ffi = { git = "https://github.com/apache/datafusion.git", rev = "fb02f4ec1d17f268ca7be9757fac121213c9bdc9" }
103+
datafusion-proto = { git = "https://github.com/apache/datafusion.git", rev = "fb02f4ec1d17f268ca7be9757fac121213c9bdc9" }

crates/core/src/delta_datafusion/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ mod schema_adapter;
114114
impl From<DeltaTableError> for DataFusionError {
115115
fn from(err: DeltaTableError) -> Self {
116116
match err {
117-
DeltaTableError::Arrow { source } => DataFusionError::ArrowError(source, None),
117+
DeltaTableError::Arrow { source } => DataFusionError::from(source),
118118
DeltaTableError::Io { source } => DataFusionError::IoError(source),
119-
DeltaTableError::ObjectStore { source } => DataFusionError::ObjectStore(source),
120-
DeltaTableError::Parquet { source } => DataFusionError::ParquetError(source),
119+
DeltaTableError::ObjectStore { source } => DataFusionError::from(source),
120+
DeltaTableError::Parquet { source } => DataFusionError::from(source),
121121
_ => DataFusionError::External(Box::new(err)),
122122
}
123123
}
@@ -126,10 +126,10 @@ impl From<DeltaTableError> for DataFusionError {
126126
impl From<DataFusionError> for DeltaTableError {
127127
fn from(err: DataFusionError) -> Self {
128128
match err {
129-
DataFusionError::ArrowError(source, _) => DeltaTableError::Arrow { source },
129+
DataFusionError::ArrowError(source, _) => DeltaTableError::from(*source),
130130
DataFusionError::IoError(source) => DeltaTableError::Io { source },
131-
DataFusionError::ObjectStore(source) => DeltaTableError::ObjectStore { source },
132-
DataFusionError::ParquetError(source) => DeltaTableError::Parquet { source },
131+
DataFusionError::ObjectStore(source) => DeltaTableError::from(*source),
132+
DataFusionError::ParquetError(source) => DeltaTableError::from(*source),
133133
_ => DeltaTableError::Generic(err.to_string()),
134134
}
135135
}

crates/core/src/operations/merge/barrier.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,11 @@ impl Stream for MergeBarrierStream {
299299
.columns()
300300
.iter()
301301
.map(|c| {
302-
arrow::compute::take(c.as_ref(), &indices, None)
303-
.map_err(|err| {
304-
DataFusionError::ArrowError(err, None)
305-
})
302+
Ok(arrow::compute::take(
303+
c.as_ref(),
304+
&indices,
305+
None,
306+
)?)
306307
})
307308
.collect::<DataFusionResult<Vec<ArrayRef>>>()?;
308309

0 commit comments

Comments
 (0)