pub struct SparklessConfig {
pub warehouse_dir: Option<PathBuf>,
pub temp_dir: Option<PathBuf>,
pub case_sensitive: bool,
pub extra: HashMap<String, String>,
}Expand description
Configuration for building a SparkSession.
Can be constructed manually or from environment variables via SparklessConfig::from_env.
Fields§
§warehouse_dir: Option<PathBuf>Directory for disk-backed tables (saveAsTable). Maps to spark.sql.warehouse.dir.
temp_dir: Option<PathBuf>Optional temp directory for intermediate data. Reserved for future use.
case_sensitive: boolWhen true, column names are case-sensitive. Default is false (PySpark default).
Maps to spark.sql.caseSensitive.
extra: HashMap<String, String>Extra Spark-style config key-value pairs (e.g. spark.app.name, spark.executor.memory).
Implementations§
Source§impl SparklessConfig
impl SparklessConfig
Sourcepub fn from_env() -> SparklessConfig
pub fn from_env() -> SparklessConfig
Build config from environment variables.
ROBIN_SPARKLESS_WAREHOUSE_DIR→warehouse_dirROBIN_SPARKLESS_TEMP_DIR→temp_dirROBIN_SPARKLESS_CASE_SENSITIVE→case_sensitive(any value that is “true” or “1” case-insensitively)ROBIN_SPARKLESS_CONFIG_*→ keys inextra; the key is the suffix after the prefix, with underscores converted to dots (e.g.ROBIN_SPARKLESS_CONFIG_SPARK_APP_NAME→spark.app.name)
Sourcepub fn to_session_config(&self) -> HashMap<String, String>
pub fn to_session_config(&self) -> HashMap<String, String>
Convert to the session config map (spark.sql.warehouse.dir, spark.sql.caseSensitive, plus extra).
Trait Implementations§
Source§impl Clone for SparklessConfig
impl Clone for SparklessConfig
Source§fn clone(&self) -> SparklessConfig
fn clone(&self) -> SparklessConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SparklessConfig
impl Debug for SparklessConfig
Source§impl Default for SparklessConfig
impl Default for SparklessConfig
Source§fn default() -> SparklessConfig
fn default() -> SparklessConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SparklessConfig
impl RefUnwindSafe for SparklessConfig
impl Send for SparklessConfig
impl Sync for SparklessConfig
impl Unpin for SparklessConfig
impl UnsafeUnpin for SparklessConfig
impl UnwindSafe for SparklessConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
Converts
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> ⓘ
Converts
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