Skip to main content

Engine

Trait Engine 

Source
pub trait Engine: AsAny {
    // Required methods
    fn evaluation_handler(&self) -> Arc<dyn EvaluationHandler> ⓘ;
    fn storage_handler(&self) -> Arc<dyn StorageHandler> ⓘ;
    fn json_handler(&self) -> Arc<dyn JsonHandler> ⓘ;
    fn parquet_handler(&self) -> Arc<dyn ParquetHandler> ⓘ;

    // Provided methods
    fn plan_executor(&self) -> Option<Arc<dyn PlanExecutor>> { ... }
    fn require_plan_executor(&self) -> DeltaResult<Arc<dyn PlanExecutor>> { ... }
}
Expand description

The Engine trait encapsulates the functionality an engine or connector provides to operate on Delta tables.

Connectors pass an implementation of this trait to Delta Kernel operations.

Required Methods§

Source

fn evaluation_handler(&self) -> Arc<dyn EvaluationHandler> ⓘ

Get the connector provided EvaluationHandler.

Source

fn storage_handler(&self) -> Arc<dyn StorageHandler> ⓘ

Get the connector provided StorageHandler

Source

fn json_handler(&self) -> Arc<dyn JsonHandler> ⓘ

Get the connector provided JsonHandler.

Source

fn parquet_handler(&self) -> Arc<dyn ParquetHandler> ⓘ

Get the connector provided ParquetHandler.

Provided Methods§

Source

fn plan_executor(&self) -> Option<Arc<dyn PlanExecutor>>

Available on crate feature declarative-plans only.

Get the connector provided PlanExecutor, or None if this engine provides none.

The default implementation returns None. A connector opts into plan-based execution by overriding this to return its executor.

Source

fn require_plan_executor(&self) -> DeltaResult<Arc<dyn PlanExecutor>>

Available on crate feature declarative-plans only.

Get the connector provided PlanExecutor, erroring if this engine provides none.

§Errors

Returns Error::Unsupported when plan_executor is None.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Engine for MeteredDeltaEngine

Source§

impl Engine for PlanBasedEngine

Available on crate feature declarative-plans and crate feature default-engine-base and (crate features arrow-conversion or declarative-plans or default-engine-base) only.