Vladimir Sitnikov created OPTIQ-312:
---------------------------------------

             Summary: Need PushProjectThroughWindowRel
                 Key: OPTIQ-312
                 URL: https://issues.apache.org/jira/browse/OPTIQ-312
             Project: optiq
          Issue Type: Improvement
            Reporter: Vladimir Sitnikov
            Assignee: Julian Hyde
            Priority: Minor


Currently optiq does not push projects through {{WindowRel}}, thus it feeds 
excessive data to {{WindowRel}}.

{code:sql}
select *
  from (
    select "empid", "deptno", count(*) over (partition by "deptno") c
      from "hr"."emps"
 )
 where "deptno"=10 and "empid"=100{code}

Optiq should recognize it is required to track just fields {{empid}} and 
{{deptno}}.

However the java code is as follows (note that empid, name, salary, and 
commission are projected):
{code:java}
/*  47 */       _list.add(new Object[] {
/*  48 */         row.empid,
/*  49 */         row.deptno,
/*  50 */         row.name,
/*  51 */         row.salary,
/*  52 */         row.commission,
/*  53 */         COUNTa0w0});
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to