You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/03/09 22:25:38 UTC

[jira] [Commented] (DRILL-2060) Support constant folding in expressions in Filter

    [ https://issues.apache.org/jira/browse/DRILL-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353636#comment-14353636 ] 

Jason Altekruse commented on DRILL-2060:
----------------------------------------

There have been some difficulties with the constant folding rule and a number of current system tests. To allow a subset of this work to be merged into the codebase while these issues are being debugged, I have opened a new JIRA for the bulk of the refactoring DRILL-2406. The only part of these patches that will remain in association with this JIRA is the actual constant folding rule itself and the extra pieces needed to hook it up to calcite, will post a revised patch soon.

> 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-const-folding-feb-6.diff, DRILL-2060-part1-const-folding-feb-27.patch, DRILL-2060-part2-const-folding-feb-27.patch, 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)