Package io.trino.sql.ir.optimizer.rule
Class SimplifyRedundantCast
java.lang.Object
io.trino.sql.ir.optimizer.rule.SimplifyRedundantCast
- All Implemented Interfaces:
IrOptimizerRule
Remove casts where the target type matches the type of the input expression. E.g,
Cast(x::bigint, bigint) -> x
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(Expression expression, Session session, Map<Symbol, Expression> bindings)
-
Constructor Details
-
SimplifyRedundantCast
public SimplifyRedundantCast()
-
-
Method Details
-
apply
public Optional<Expression> apply(Expression expression, Session session, Map<Symbol, Expression> bindings) - Specified by:
applyin interfaceIrOptimizerRule
-