Class UnwrapDateTruncInComparison
java.lang.Object
io.trino.sql.planner.iterative.rule.ExpressionRewriteRuleSet
io.trino.sql.planner.iterative.rule.UnwrapDateTruncInComparison
Given constant temporal unit U and a constant date/time expression t that's rounded to unit,
converts expression of the form
date_trunc(unit, date_time) = t
into
date_time BETWEEN t AND (t + unit)
It also applies to comparison operators other than equality and detects expressions that
are known to be true or false, e.g. date_trunc('month', ...) = DATE '2005-09-10'
is known to be false.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.trino.sql.planner.iterative.rule.ExpressionRewriteRuleSet
ExpressionRewriteRuleSet.ExpressionRewriter -
Constructor Summary
ConstructorsConstructorDescriptionUnwrapDateTruncInComparison(PlannerContext plannerContext, TypeAnalyzer typeAnalyzer) -
Method Summary
Methods inherited from class io.trino.sql.planner.iterative.rule.ExpressionRewriteRuleSet
aggregationExpressionRewrite, filterExpressionRewrite, joinExpressionRewrite, patternRecognitionExpressionRewrite, projectExpressionRewrite, rules, valuesExpressionRewrite
-
Constructor Details
-
UnwrapDateTruncInComparison
-