Class RemoveRedundantLogicalTerms

java.lang.Object
io.trino.sql.ir.optimizer.rule.RemoveRedundantLogicalTerms
All Implemented Interfaces:
IrOptimizerRule

public class RemoveRedundantLogicalTerms extends Object implements 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