Skip to content

Commit b0dce09

Browse files
committed
minor changes
1 parent 035c45b commit b0dce09

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/query_planner.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
use std::sync::Arc;
22

33
use anyhow::anyhow;
4-
use arrow::datatypes::SchemaRef;
4+
use arrow::datatypes::{DataType, Field, Schema, SchemaRef};
55
use datafusion::{
66
logical_expr::LogicalPlan, physical_plan::ExecutionPlan, prelude::SessionContext,
77
};
88
use datafusion_substrait::logical_plan::consumer::from_substrait_plan;
9+
use datafusion_substrait::substrait::proto::Plan;
910

1011
use crate::{
1112
explain::{is_explain_query, DistributedExplainExec},
@@ -131,10 +132,7 @@ impl QueryPlanner {
131132
}
132133

133134
/// Prepare a distributed query (Substrait entry point)
134-
pub async fn prepare_substrait_query(
135-
&self,
136-
substrait_plan: datafusion_substrait::substrait::proto::Plan,
137-
) -> Result<QueryPlan> {
135+
pub async fn prepare_substrait_query(&self, substrait_plan: Plan) -> Result<QueryPlan> {
138136
let base_result = self
139137
.prepare_substrait_query_base(substrait_plan, "SUBSTRAIT")
140138
.await?;
@@ -143,7 +141,7 @@ impl QueryPlanner {
143141

144142
pub async fn prepare_substrait_query_base(
145143
&self,
146-
substrait_plan: datafusion_substrait::substrait::proto::Plan,
144+
substrait_plan: Plan,
147145
query_type: &str,
148146
) -> Result<QueryPlanBase> {
149147
debug!(
@@ -219,7 +217,6 @@ impl QueryPlanner {
219217
);
220218

221219
// create the schema for EXPLAIN results
222-
use arrow::datatypes::{DataType, Field, Schema};
223220
let schema = Arc::new(Schema::new(vec![
224221
Field::new("plan_type", DataType::Utf8, false),
225222
Field::new("plan", DataType::Utf8, false),

0 commit comments

Comments
 (0)