Package io.trino.sql.ir.optimizer.rule
Class RemoveRedundantCoalesceArguments
java.lang.Object
io.trino.sql.ir.optimizer.rule.RemoveRedundantCoalesceArguments
- All Implemented Interfaces:
IrOptimizerRule
Remove duplicate deterministic arguments and any argument after the first
non-null constant. E.g,
Coalesce(a, b, c, a, d) -> Coalesce(a, b, c, d)Coalesce(a, b, 'hello', c, d) -> Coalesce(a, b, 'hello')
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(Expression expression, Session session, Map<Symbol, Expression> bindings)
-
Constructor Details
-
RemoveRedundantCoalesceArguments
public RemoveRedundantCoalesceArguments()
-
-
Method Details
-
apply
public Optional<Expression> apply(Expression expression, Session session, Map<Symbol, Expression> bindings) - Specified by:
applyin interfaceIrOptimizerRule
-