mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-08 22:33:22 +00:00
@@ -1,6 +1,12 @@
|
||||
use async_trait::async_trait;
|
||||
use datafusion::arrow::datatypes::SchemaRef;
|
||||
use datafusion::logical_expr::LogicalPlan as DFPlan;
|
||||
|
||||
use crate::QueryResult;
|
||||
|
||||
use super::ast::ExtStatement;
|
||||
use super::session::SessionCtx;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum Plan {
|
||||
// only support query sql
|
||||
@@ -27,3 +33,8 @@ impl QueryPlan {
|
||||
matches!(self.df_plan, DFPlan::Explain(_) | DFPlan::Analyze(_))
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait LogicalPlanner {
|
||||
async fn create_logical_plan(&self, statement: ExtStatement, session: &SessionCtx) -> QueryResult<Plan>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user