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

Mehant Baid updated DRILL-1266:
-------------------------------

    Fix Version/s:     (was: 0.5.0)
                   0.6.0

> Filter does not get pushed beyond sort when querying views created with order 
> by
> --------------------------------------------------------------------------------
>
>                 Key: DRILL-1266
>                 URL: https://issues.apache.org/jira/browse/DRILL-1266
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Mehant Baid
>            Assignee: Mehant Baid
>             Fix For: 0.6.0
>
>
> Can reproduce the issue using the following steps.
> create view emp as select cast(e.employee_id as int)emp_id, cast(e.full_name 
> as varchar(100))full_name from cp.`employee.json` e order by cast(employe_id 
> as int); 
> explain plan for select * from emp where emp_id > 100;
> Here is the plan for the query on the view with a simple filter.
> 00-00    Screen
> 00-01      Project(emp_id=[CAST($0):INTEGER NOT NULL], 
> full_name=[CAST($1):VARCHAR(100) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary" NOT NULL])
> 00-02        SelectionVectorRemover
> 00-03          Filter(condition=[>(CAST($0):INTEGER NOT NULL, 100)])
> 00-04            Sort(sort0=[$2], dir0=[ASC])
> 00-05              Project(emp_id=[CAST($1):INTEGER], 
> full_name=[CAST($2):VARCHAR(100) CHARACTER SET "ISO-8859-1" COLLATE 
> "ISO-8859-1$en_US$primary"], EXPR$2=[CAST($3):INTEGER])
> 00-06                Scan(groupscan=[EasyGroupScan 
> [selectionRoot=/employee.json, columns = null]])



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

Reply via email to