Apache DataFusion SQL Query Engine
Update substrait requirement from 0.16.0 to 0.17.0 (#7808)
dependabot[bot]19d22d396c9b
diff --git a/datafusion/substrait/Cargo.toml b/datafusion/substrait/Cargo.tomlindex 13b9c02cdd..44a13cdcac 100644--- a/datafusion/substrait/Cargo.toml+++ b/datafusion/substrait/Cargo.toml@@ -33,9 +33,9 @@ chrono = { workspace = true }datafusion = { version = "32.0.0", path = "../core" }itertools = "0.11"object_store = "0.7.0"-prost = "0.11"-prost-types = "0.11"-substrait = "0.16.0"+prost = "0.12"+prost-types = "0.12"+substrait = "0.17.0"tokio = "1.17"[features]diff --git a/datafusion/substrait/src/logical_plan/consumer.rs b/datafusion/substrait/src/logical_plan/consumer.rsindex 82e457767b..ae65a2c7d9 100644--- a/datafusion/substrait/src/logical_plan/consumer.rs+++ b/datafusion/substrait/src/logical_plan/consumer.rs@@ -480,8 +480,8 @@ pub async fn from_substrait_rel(}_ => not_impl_err!("Only NamedTable reads are supported"),},- Some(RelType::Set(set)) => match set_rel::SetOp::from_i32(set.op) {- Some(set_op) => match set_op {+ Some(RelType::Set(set)) => match set_rel::SetOp::try_from(set.op) {+ Ok(set_op) => match set_op {set_rel::SetOp::UnionAll => {if !set.inputs.is_empty() {let mut union_builder = Ok(LogicalPlanBuilder::from(@@ -498,7 +498,7 @@ pub async fn from_substrait_rel(}_ => not_impl_err!("Unsupported set operator: {set_op:?}"),},- None => not_impl_err!("Invalid set operation type None"),+ Err(e) => not_impl_err!("Invalid set operation type {}: {e}", set.op),},Some(RelType::ExtensionLeaf(extension)) => {let Some(ext_detail) = &extension.detail else {@@ -554,7 +554,7 @@ pub async fn from_substrait_rel(}fn from_substrait_jointype(join_type: i32) -> Result<JoinType> {- if let Some(substrait_join_type) = join_rel::JoinType::from_i32(join_type) {+ if let Ok(substrait_join_type) = join_rel::JoinType::try_from(join_type) {match substrait_join_type {join_rel::JoinType::Inner => Ok(JoinType::Inner),join_rel::JoinType::Left => Ok(JoinType::Left),@@ -582,7 +582,7 @@ pub async fn from_substrait_sorts(let asc_nullfirst = match &s.sort_kind {Some(k) => match k {Direction(d) => {- let Some(direction) = SortDirection::from_i32(*d) else {+ let Ok(direction) = SortDirection::try_from(*d) else {return not_impl_err!("Unsupported Substrait SortDirection value {d}");