Skip to content

Apache DataFusion SQL Query Engine

Upgrade to substrait 0.3 (#4895)

Andy Grove84ba3c2d976d
diff --git a/datafusion/substrait/Cargo.toml b/datafusion/substrait/Cargo.toml
index 091b3a565b..41c9e4d051 100644
--- a/datafusion/substrait/Cargo.toml
+++ b/datafusion/substrait/Cargo.toml
@@ -24,9 +24,9 @@ rust-version = "1.62"
[dependencies]
async-recursion = "1.0"
datafusion = { version = "16.0.0", path = "../core" }
-prost = "0.9"
-prost-types = "0.9"
-substrait = "0.2"
+prost = "0.11"
+prost-types = "0.11"
+substrait = "0.3"
tokio = "1.17"
[build-dependencies]
diff --git a/datafusion/substrait/src/producer.rs b/datafusion/substrait/src/producer.rs
index ab32983b9b..902c389d8e 100644
--- a/datafusion/substrait/src/producer.rs
+++ b/datafusion/substrait/src/producer.rs
@@ -74,6 +74,7 @@ pub fn to_substrait_plan(plan: &LogicalPlan) -> Result<Box<Plan>> {
// Return parsed plan
Ok(Box::new(Plan {
+ version: None, // TODO: https://github.com/apache/arrow-datafusion/issues/4949
extension_uris: vec![],
extensions: function_extensions,
relations: plan_rels,
@@ -115,6 +116,7 @@ pub fn to_substrait_rel(
r#struct: None,
}),
filter: None,
+ best_effort_filter: None,
projection: Some(MaskExpression {
select: Some(StructSelect { struct_items }),
maintain_singular_struct: false,
@@ -367,6 +369,7 @@ pub fn to_substrait_agg_measure(
},
phase: substrait::protobuf::AggregationPhase::Unspecified as i32,
args: vec![],
+ options: vec![],
}),
filter: match filter {
Some(f) => Some(to_substrait_rex(f, schema, extension_info)?),
@@ -447,6 +450,7 @@ pub fn make_binary_op_scalar_func(
],
output_type: None,
args: vec![],
+ options: vec![],
})),
}
}