Skip to main content

PlanExecutor

Trait PlanExecutor 

Source
pub trait PlanExecutor<S>: Send + Sync{
    // Required method
    fn execute_plan(
        session: &S,
        data: Vec<Vec<Value>>,
        schema: Vec<(String, String)>,
        plan: &[Value],
    ) -> Result<Box<dyn DataFrameBackend>, EngineError>;
}
Expand description

Executes a logical plan (JSON list of ops) and returns a DataFrame.

The generic type parameter S is a backend-specific SparkSessionBackend implementation (e.g. the Polars-backed SparkSession in robin-sparkless-polars). Backends implement this trait to expose plan execution in terms of engine-agnostic traits and EngineError.

Required Methods§

Source

fn execute_plan( session: &S, data: Vec<Vec<Value>>, schema: Vec<(String, String)>, plan: &[Value], ) -> Result<Box<dyn DataFrameBackend>, EngineError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PlanExecutor<SparkSession> for PolarsPlanExecutor

Source§

fn execute_plan( session: &SparkSession, data: Vec<Vec<Value>>, schema: Vec<(String, String)>, plan: &[Value], ) -> Result<Box<dyn DataFrameBackend>, EngineError>

Implementors§