drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehant Baid (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-1266) Filter does not get pushed beyond sort when querying views created with order by
Date Wed, 06 Aug 2014 04:52:12 GMT
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)

Mime
View raw message