pub struct SimplifySparqlExpressionsRule;
Expand description
An optimizer rule that tries to optimize SPARQL expressions.
Currently, the following transformations are implemented:
- IS_COMPATIBLE(A, B) => A = B, if A and B are not nullable
- EFFECTIVE_BOOLEAN_VALUE(BOOLEAN_AS_TERM(X)) -> X
Implementations§
Source§impl SimplifySparqlExpressionsRule
impl SimplifySparqlExpressionsRule
Sourcepub fn new() -> SimplifySparqlExpressionsRule
pub fn new() -> SimplifySparqlExpressionsRule
Creates a new SimplifySparqlExpressionsRule.
Trait Implementations§
Source§impl Default for SimplifySparqlExpressionsRule
impl Default for SimplifySparqlExpressionsRule
Source§fn default() -> SimplifySparqlExpressionsRule
fn default() -> SimplifySparqlExpressionsRule
Returns the “default value” for a type. Read more
Source§impl OptimizerRule for SimplifySparqlExpressionsRule
impl OptimizerRule for SimplifySparqlExpressionsRule
Source§fn apply_order(&self) -> Option<ApplyOrder>
fn apply_order(&self) -> Option<ApplyOrder>
How should the rule be applied by the optimizer? See comments on
ApplyOrder
for details. Read moreSource§fn rewrite(
&self,
plan: LogicalPlan,
_config: &dyn OptimizerConfig,
) -> Result<Transformed<LogicalPlan>, DataFusionError>
fn rewrite( &self, plan: LogicalPlan, _config: &dyn OptimizerConfig, ) -> Result<Transformed<LogicalPlan>, DataFusionError>
Try to rewrite
plan
to an optimized form, returning Transformed::yes
if the plan was rewritten and Transformed::no
if it was not.Source§fn supports_rewrite(&self) -> bool
fn supports_rewrite(&self) -> bool
👎Deprecated since 47.0.0: This method is no longer used
Does this rule support rewriting owned plans (rather than by reference)?
Auto Trait Implementations§
impl Freeze for SimplifySparqlExpressionsRule
impl RefUnwindSafe for SimplifySparqlExpressionsRule
impl Send for SimplifySparqlExpressionsRule
impl Sync for SimplifySparqlExpressionsRule
impl Unpin for SimplifySparqlExpressionsRule
impl UnwindSafe for SimplifySparqlExpressionsRule
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> 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