Package io.trino.sql.ir.optimizer.rule
Class RemoveRedundantLogicalTerms
java.lang.Object
io.trino.sql.ir.optimizer.rule.RemoveRedundantLogicalTerms
- All Implemented Interfaces:
IrOptimizerRule
Remove duplicated and redundant terms in logical expressions. E.g.,
And(a, b, a, true, c) -> And(a, b, c)Or(a, b, a, false, c) -> Or(a, b, c)And(a, a) -> a
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(Expression expression, Session session, Map<Symbol, Expression> bindings)
-
Constructor Details
-
RemoveRedundantLogicalTerms
public RemoveRedundantLogicalTerms()
-
-
Method Details
-
apply
public Optional<Expression> apply(Expression expression, Session session, Map<Symbol, Expression> bindings) - Specified by:
applyin interfaceIrOptimizerRule
-