[ 
https://issues.apache.org/jira/browse/CALCITE-545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-545.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.0-incubating

Fixed in 
http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/c9e58edf.

> When a projected expression can only have one value, replace with that 
> constant
> -------------------------------------------------------------------------------
>
>                 Key: CALCITE-545
>                 URL: https://issues.apache.org/jira/browse/CALCITE-545
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>             Fix For: 1.0.0-incubating
>
>
> When we have deduced that an expression can only have one value, replace the 
> expression with that value. This is beneficial because it will allow us to do 
> more column trimming.
> Example 1
> {code}select deptno from emp where deptno = 10{code}
> can become
> {code}select 10 from emp where deptno = 10{code}
> Example 2 (using inference, as in CALCITE-360)
> {code}select emp.deptno
> from emp join dept using (deptno)
> where dept.deptno = 10{code}
> can become
> {code}select 10
> from emp join dept using (deptno)
> where dept.deptno = 10{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to