Package io.trino.sql.ir.optimizer.rule
package io.trino.sql.ir.optimizer.rule
-
ClassesClassDescriptionTransforms:Transforms:Evaluates a constant Array expressionEvaluates a constant Bind expressionEvaluates a constant Call expressionEvaluates a constant Call expression where at least one of the arguments is nullEvaluates a constant Case expression:
Case(When(TRUE, r), When(...), When(...)->rEvaluates a constant Cast expressionEvaluates a constant Comparison expressionResolves field reference from an explicit row.Evaluates a constant IN expressionPartial evaluation of IsNull.Evaluates a constant logical expression.Evaluates a constant NullIf expressionEvaluates a constant Row expressionEvaluates a constant Switch expressionFlatten nested coalesce expressions.Flatten nested logical terms.Remove duplicated and redundant clauses in Case.Remove duplicate deterministic arguments and any argument after the first non-null constant.Remove duplicated and redundant terms in logical expressions.Remove duplicated and redundant clauses in Switch.Simplifies logical expression containing terms and negations of those terms.Simplify IN expression with continuous range of constant test values into a BETWEEN expression.Simplify CASE expressions with constant TRUE/FALSE results:Case([When(a, true), When(b, false), When(c, true)], false) -> $identical(Or(a, c), true)Case([When(a, true), When(b, false), When(c, false)], true) -> $not($identical(Or(b, c), true)Remove casts where the target type matches the type of the input expression.Simplify stacked arithmetic negations expressions.Simplify stacked Not expressions.Optimize case of transformation with cast and json_extract_scalars E.g,transform(cast(json_parse(varchar_column) as array<json>), json -> json_extract_scalar(json, jsonPath)) -> $internal$json_string_array_extract_scalar(varchar_column, jsonPath)