pub struct SessionState {
    pub session_id: String,
    pub optimizer: Optimizer,
    pub physical_optimizers: Vec<Arc<dyn PhysicalOptimizerRule + Send + Sync>>,
    pub query_planner: Arc<dyn QueryPlanner + Send + Sync>,
    pub catalog_list: Arc<dyn CatalogList>,
    pub scalar_functions: HashMap<String, Arc<ScalarUDF>>,
    pub aggregate_functions: HashMap<String, Arc<AggregateUDF>>,
    pub config: SessionConfig,
    pub execution_props: ExecutionProps,
    pub runtime_env: Arc<RuntimeEnv>,
}
Expand description

Execution context for registering data sources and executing queries

Fields

session_id: String

Uuid for the session

optimizer: Optimizer

Responsible for optimizing a logical plan

physical_optimizers: Vec<Arc<dyn PhysicalOptimizerRule + Send + Sync>>

Responsible for optimizing a physical execution plan

query_planner: Arc<dyn QueryPlanner + Send + Sync>

Responsible for planning LogicalPlans, and ExecutionPlan

catalog_list: Arc<dyn CatalogList>

Collection of catalogs containing schemas and ultimately TableProviders

scalar_functions: HashMap<String, Arc<ScalarUDF>>

Scalar functions that are registered with the context

aggregate_functions: HashMap<String, Arc<AggregateUDF>>

Aggregate functions registered in the context

config: SessionConfig

Session configuration

execution_props: ExecutionProps

Execution properties

runtime_env: Arc<RuntimeEnv>

Runtime environment

Implementations

Returns new SessionState using the provided configuration and runtime

Replace the default query planner

Replace the optimizer rules

Replace the physical optimizer rules

Adds a new OptimizerRule

Optimizes the logical plan by applying optimizer rules.

Creates a physical plan from a logical plan.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Getter for a datasource

Getter for a UDF description

Getter for a UDAF description

Getter for system/user-defined variable type

Formats the value using the given formatter. Read more

Create a new task context instance from SessionState

Converts to this type from the input type.

Set of all available udfs.

Returns a reference to the udf named name.

Returns a reference to the udaf named name.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.