Skip to main content

SessionRuntimeConfig

Struct SessionRuntimeConfig 

Source
pub struct SessionRuntimeConfig {
    pub pyspark_compat: PysparkCompat,
    pub ansi_enabled: bool,
    pub disable_map_key_normalization: bool,
    pub infer_map_type_from_first_pair: bool,
    pub infer_array_type_from_first_element: bool,
    pub legacy_postgres_datetime_mapping: bool,
    pub legacy_mysql_datetime_mapping: bool,
    pub legacy_oracle_timestamp_mapping: bool,
    pub legacy_mssqlserver_datetime_mapping: bool,
    pub legacy_db2_datetime_mapping: bool,
}
Expand description

Execution semantics derived from spark.conf and compat profile.

Fields§

§pyspark_compat: PysparkCompat§ansi_enabled: bool§disable_map_key_normalization: bool§infer_map_type_from_first_pair: bool§infer_array_type_from_first_element: bool§legacy_postgres_datetime_mapping: bool

PySpark 3.5 JDBC datetime mapping for PostgreSQL (legacy restore).

§legacy_mysql_datetime_mapping: bool

PySpark 3.5 JDBC type mapping for MySQL/MariaDB (legacy restore).

§legacy_oracle_timestamp_mapping: bool

PySpark 3.5 JDBC timestamp write mapping for Oracle (legacy restore).

§legacy_mssqlserver_datetime_mapping: bool

PySpark 3.5 JDBC type mapping for SQL Server (legacy restore).

§legacy_db2_datetime_mapping: bool

PySpark 3.5 JDBC type mapping for DB2 (legacy restore).

Implementations§

Source§

impl SessionRuntimeConfig

Source

pub fn for_compat(compat: PysparkCompat) -> Self

Bundle defaults for a compatibility profile.

Source

pub fn from_session_map(map: &HashMap<String, String>) -> Self

Parse from session config map (and optional env compat before session is built).

Source

pub fn apply_profile_to_map(&self, map: &mut HashMap<String, String>)

Apply profile bundle keys into a session config map (used when setting compat).

Source

pub fn set_compat_profile( map: &mut HashMap<String, String>, compat: PysparkCompat, )

Apply compat profile and write bundled keys into the map.

Source

pub fn compat_from_env() -> Option<PysparkCompat>

Read compat from environment (SPARKLESS_PYSPARK_COMPAT).

Trait Implementations§

Source§

impl Clone for SessionRuntimeConfig

Source§

fn clone(&self) -> SessionRuntimeConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SessionRuntimeConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SessionRuntimeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for SessionRuntimeConfig

Source§

impl PartialEq for SessionRuntimeConfig

Source§

fn eq(&self, other: &SessionRuntimeConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SessionRuntimeConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.