Struct datafusion::execution::context::SessionConfig
source · [−]pub struct SessionConfig {
pub target_partitions: usize,
pub repartition_joins: bool,
pub repartition_aggregations: bool,
pub repartition_windows: bool,
pub parquet_pruning: bool,
pub config_options: ConfigOptions,
/* private fields */
}
Expand description
Configuration options for session context
Fields
target_partitions: usize
Number of partitions for query execution. Increasing partitions can increase concurrency.
repartition_joins: bool
Should DataFusion repartition data using the join keys to execute joins in parallel
using the provided target_partitions
level
repartition_aggregations: bool
Should DataFusion repartition data using the aggregate keys to execute aggregates in parallel
using the provided target_partitions
level
repartition_windows: bool
Should DataFusion repartition data using the partition keys to execute window functions in
parallel using the provided target_partitions
level
parquet_pruning: bool
Should DataFusion parquet reader using the predicate to prune data
config_options: ConfigOptions
Configuration options
Implementations
sourceimpl SessionConfig
impl SessionConfig
sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create an execution config with config options read from the environment
sourcepub fn set(self, key: &str, value: ScalarValue) -> Self
pub fn set(self, key: &str, value: ScalarValue) -> Self
Set a configuration option
sourcepub fn with_batch_size(self, n: usize) -> Self
pub fn with_batch_size(self, n: usize) -> Self
Customize batch size
sourcepub fn with_target_partitions(self, n: usize) -> Self
pub fn with_target_partitions(self, n: usize) -> Self
Customize target_partitions
sourcepub fn with_default_catalog_and_schema(
self,
catalog: impl Into<String>,
schema: impl Into<String>
) -> Self
pub fn with_default_catalog_and_schema(
self,
catalog: impl Into<String>,
schema: impl Into<String>
) -> Self
Selects a name for the default catalog and schema
sourcepub fn create_default_catalog_and_schema(self, create: bool) -> Self
pub fn create_default_catalog_and_schema(self, create: bool) -> Self
Controls whether the default catalog and schema will be automatically created
sourcepub fn with_information_schema(self, enabled: bool) -> Self
pub fn with_information_schema(self, enabled: bool) -> Self
Enables or disables the inclusion of information_schema
virtual tables
sourcepub fn with_repartition_joins(self, enabled: bool) -> Self
pub fn with_repartition_joins(self, enabled: bool) -> Self
Enables or disables the use of repartitioning for joins to improve parallelism
sourcepub fn with_repartition_aggregations(self, enabled: bool) -> Self
pub fn with_repartition_aggregations(self, enabled: bool) -> Self
Enables or disables the use of repartitioning for aggregations to improve parallelism
sourcepub fn with_repartition_windows(self, enabled: bool) -> Self
pub fn with_repartition_windows(self, enabled: bool) -> Self
Enables or disables the use of repartitioning for window functions to improve parallelism
sourcepub fn with_parquet_pruning(self, enabled: bool) -> Self
pub fn with_parquet_pruning(self, enabled: bool) -> Self
Enables or disables the use of pruning predicate for parquet readers to skip row groups
sourcepub fn batch_size(&self) -> usize
pub fn batch_size(&self) -> usize
Get the currently configured batch size
sourcepub fn config_options(&self) -> &ConfigOptions
pub fn config_options(&self) -> &ConfigOptions
Get the current configuration options
Trait Implementations
sourceimpl Clone for SessionConfig
impl Clone for SessionConfig
sourcefn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnwindSafe for SessionConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more