#[non_exhaustive]pub struct ConfigOptions {
pub catalog: CatalogOptions,
pub execution: ExecutionOptions,
pub optimizer: OptimizerOptions,
pub sql_parser: SqlParserOptions,
pub explain: ExplainOptions,
pub extensions: Extensions,
pub format: FormatOptions,
}Expand description
Configuration options struct, able to store both built-in configuration and custom options
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.catalog: CatalogOptionsCatalog options
execution: ExecutionOptionsExecution options
optimizer: OptimizerOptionsOptimizer options
sql_parser: SqlParserOptionsSQL parser options
explain: ExplainOptionsExplain options
extensions: ExtensionsOptional extensions registered using Extensions::insert
format: FormatOptionsFormatting options when printing batches
Implementations§
Source§impl ConfigOptions
impl ConfigOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ConfigOptions with default values
Sourcepub fn with_extensions(self, extensions: Extensions) -> Self
pub fn with_extensions(self, extensions: Extensions) -> Self
Set extensions to provided value
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Create new ConfigOptions, taking values from environment variables
where possible.
For example, to configure datafusion.execution.batch_size
(ExecutionOptions::batch_size) you would set the
DATAFUSION_EXECUTION_BATCH_SIZE environment variable.
The name of the environment variable is the option’s key, transformed to uppercase and with periods replaced with underscores.
Values are parsed according to the same rules used in casts from Utf8.
If the value in the environment variable cannot be cast to the type of the configuration option, the default value will be used instead and a warning emitted. Environment variables are read when this method is called, and are not re-read later.
Sourcepub fn from_string_hash_map(settings: &HashMap<String, String>) -> Result<Self>
pub fn from_string_hash_map(settings: &HashMap<String, String>) -> Result<Self>
Create new ConfigOptions struct, taking values from a string hash map.
Only the built-in configurations will be extracted from the hash map and other key value pairs will be ignored.
Sourcepub fn entries(&self) -> Vec<ConfigEntry>
pub fn entries(&self) -> Vec<ConfigEntry>
Returns the ConfigEntry stored within this ConfigOptions
Sourcepub fn generate_config_markdown() -> String
pub fn generate_config_markdown() -> String
Generate documentation that can be included in the user guide
Trait Implementations§
Source§impl Clone for ConfigOptions
impl Clone for ConfigOptions
Source§fn clone(&self) -> ConfigOptions
fn clone(&self) -> ConfigOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConfigField for ConfigOptions
impl ConfigField for ConfigOptions
Source§impl Debug for ConfigOptions
impl Debug for ConfigOptions
Source§impl Default for ConfigOptions
impl Default for ConfigOptions
Source§fn default() -> ConfigOptions
fn default() -> ConfigOptions
Auto Trait Implementations§
impl Freeze for ConfigOptions
impl !RefUnwindSafe for ConfigOptions
impl Send for ConfigOptions
impl Sync for ConfigOptions
impl Unpin for ConfigOptions
impl !UnwindSafe for ConfigOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more