mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-08 14:23:13 +00:00
@@ -0,0 +1,22 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use api::query::scheduler::{ExecutionResults, Scheduler};
|
||||
use async_trait::async_trait;
|
||||
use datafusion::error::DataFusionError;
|
||||
use datafusion::execution::context::TaskContext;
|
||||
use datafusion::physical_plan::{execute_stream, ExecutionPlan};
|
||||
|
||||
pub struct LocalScheduler {}
|
||||
|
||||
#[async_trait]
|
||||
impl Scheduler for LocalScheduler {
|
||||
async fn schedule(
|
||||
&self,
|
||||
plan: Arc<dyn ExecutionPlan>,
|
||||
context: Arc<TaskContext>,
|
||||
) -> Result<ExecutionResults, DataFusionError> {
|
||||
let stream = execute_stream(plan, context)?;
|
||||
|
||||
Ok(ExecutionResults::new(stream))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
pub mod local;
|
||||
Reference in New Issue
Block a user