Class PushCastIntoRow
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.ExpressionRewriteRuleSet
-
- io.trino.sql.planner.iterative.rule.PushCastIntoRow
-
public class PushCastIntoRow extends ExpressionRewriteRuleSet
Transforms expressions of the formCAST( CAST( ROW(x, y) AS row(f1 type1, f2 type2)) AS row(g1 type3, g2 type4))toCAST( ROW( CAST(x AS type1), CAST(y AS type2)) AS row(g1 type3, g2 type4))Note: it preserves the top-level CAST if the row type has field names because the names are needed by the ROW to JSON cast TODO: ideally, the types involved in ROW to JSON cast should be captured at analysis time and remain fixed for the duration of the optimization process so as to have flexibility in terms of removing field names, which are irrelevant in the IR
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.trino.sql.planner.iterative.rule.ExpressionRewriteRuleSet
ExpressionRewriteRuleSet.ExpressionRewriter
-
-
Constructor Summary
Constructors Constructor Description PushCastIntoRow()
-
Method Summary
-
Methods inherited from class io.trino.sql.planner.iterative.rule.ExpressionRewriteRuleSet
aggregationExpressionRewrite, filterExpressionRewrite, joinExpressionRewrite, patternRecognitionExpressionRewrite, projectExpressionRewrite, rules, valuesExpressionRewrite
-
-