You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2014/08/06 06:52:12 UTC

[jira] [Created] (DRILL-1266) Filter does not get pushed beyond sort when querying views created with order by

Mehant Baid created DRILL-1266:
----------------------------------

             Summary: 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


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)