[
https://issues.apache.org/jira/browse/DRILL-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14308448#comment-14308448
]
Jason Altekruse commented on DRILL-2060:
----------------------------------------
I do not believe this will address the case of moving the sum across an
inequality as Aditya gave as an example for enabling hbase pushdown in some
cases. I will try a test to confirm, but I am doubtful the rule has algebraic
functionality, as what it is looking to do is not just evaluate a
sub-expression, but re-write parent based on sub-expressions.
> Support constant folding in expressions in Filter
> -------------------------------------------------
>
> Key: DRILL-2060
> URL: https://issues.apache.org/jira/browse/DRILL-2060
> Project: Apache Drill
> Issue Type: New Feature
> Components: Execution - Flow, Query Planning & Optimization
> Reporter: Aditya Kishore
> Assignee: Jacques Nadeau
> Fix For: 0.8.0
>
> Attachments: DRILL-2060.patch
>
>
> If one side of a filter condition is a constant expression, we should be able
> to evaluate the expression in the planning phase and replace the expression
> with the constant value.
> For example, the following filter
> {{Where shipdate < date '1997-01-01' + interval '1' year}}
> can be re-written as
> {{Where shipdate < date '1998-01-01'}}
> Or
> {{Where age + 5 < 42}}
> can be re-written as
> {{Where age < 37}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)