Skip to main content

SessionStateBuilderSpark

Trait SessionStateBuilderSpark 

Source
pub trait SessionStateBuilderSpark {
    // Required method
    fn with_spark_features(self) -> Self;
}
Available on crate feature core only.
Expand description

Extension trait for adding Apache Spark features to SessionStateBuilder.

This trait provides a convenient way to register all Apache Spark-compatible functions and planners with a DataFusion session.

§Example

use datafusion::execution::SessionStateBuilder;
use datafusion_spark::SessionStateBuilderSpark;

// Create a SessionState with Apache Spark features enabled
// note: the order matters here, `with_spark_features` should be
// called after `with_default_features` to overwrite any existing functions
let state = SessionStateBuilder::new()
    .with_default_features()
    .with_spark_features()
    .build();

Required Methods§

Source

fn with_spark_features(self) -> Self

Adds all expr_planners, scalar, aggregate, window and table functions compatible with Apache Spark.

Note: This overwrites any previously registered items with the same name.

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 SessionStateBuilderSpark for SessionStateBuilder

Implementors§