pub struct ExecutionProps {
pub query_execution_start_time: DateTime<Utc>,
pub alias_generator: Arc<AliasGenerator>,
pub var_providers: Option<HashMap<VarType, Arc<dyn VarProvider + Send + Sync>>>,
}
Expand description
Holds per-query execution properties and data (such as statement starting timestamps).
An ExecutionProps
is created each time a LogicalPlan
is
prepared for execution (optimized). If the same plan is optimized
multiple times, a new ExecutionProps
is created each time.
It is important that this structure be cheap to create as it is done so during predicate pruning and expression simplification
Fields§
§query_execution_start_time: DateTime<Utc>
§alias_generator: Arc<AliasGenerator>
Alias generator used by subquery optimizer rules
var_providers: Option<HashMap<VarType, Arc<dyn VarProvider + Send + Sync>>>
Providers for scalar variables
Implementations§
source§impl ExecutionProps
impl ExecutionProps
sourcepub fn new() -> ExecutionProps
pub fn new() -> ExecutionProps
Creates a new execution props
sourcepub fn with_query_execution_start_time(
self,
query_execution_start_time: DateTime<Utc>,
) -> ExecutionProps
pub fn with_query_execution_start_time( self, query_execution_start_time: DateTime<Utc>, ) -> ExecutionProps
Set the query execution start time to use
sourcepub fn start_execution(&mut self) -> &ExecutionProps
pub fn start_execution(&mut self) -> &ExecutionProps
Marks the execution of query started timestamp. This also instantiates a new alias generator.
sourcepub fn add_var_provider(
&mut self,
var_type: VarType,
provider: Arc<dyn VarProvider + Send + Sync>,
) -> Option<Arc<dyn VarProvider + Send + Sync>>
pub fn add_var_provider( &mut self, var_type: VarType, provider: Arc<dyn VarProvider + Send + Sync>, ) -> Option<Arc<dyn VarProvider + Send + Sync>>
Registers a variable provider, returning the existing provider, if any
sourcepub fn get_var_provider(
&self,
var_type: VarType,
) -> Option<Arc<dyn VarProvider + Send + Sync>>
pub fn get_var_provider( &self, var_type: VarType, ) -> Option<Arc<dyn VarProvider + Send + Sync>>
Returns the provider for the var_type
, if any
Trait Implementations§
source§impl Clone for ExecutionProps
impl Clone for ExecutionProps
source§fn clone(&self) -> ExecutionProps
fn clone(&self) -> ExecutionProps
Returns a copy 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 ExecutionProps
impl Debug for ExecutionProps
source§impl Default for ExecutionProps
impl Default for ExecutionProps
source§fn default() -> ExecutionProps
fn default() -> ExecutionProps
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecutionProps
impl !RefUnwindSafe for ExecutionProps
impl Send for ExecutionProps
impl Sync for ExecutionProps
impl Unpin for ExecutionProps
impl !UnwindSafe for ExecutionProps
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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