You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2015/08/13 01:54:46 UTC
[jira] [Commented] (DRILL-3636) Partition Pruning : We are not
pruning sometimes when we use "is null/not null" in the filter
[ https://issues.apache.org/jira/browse/DRILL-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694429#comment-14694429 ]
Rahul Challapalli commented on DRILL-3636:
------------------------------------------
Surprisingly it works in the more complicated case below
{code}
explain plan for select count(*) from `/drill/testdata/partition_pruning/dfs/lineitempart` where case when dir0=1991 then null else 1 end is null or dir0=1992;
+------+------+
| text | json |
+------+------+
| 00-00 Screen
00-01 Project(EXPR$0=[$0])
00-02 StreamAgg(group=[{}], EXPR$0=[COUNT()])
00-03 Project($f0=[0])
00-04 Scan(groupscan=[EasyGroupScan [selectionRoot=maprfs:/drill/testdata/partition_pruning/dfs/lineitempart, numFiles=2, columns=[`dir0`], files=[maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1991/lineitemaa.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1992/lineitemab.tbl]]])
{code}
> Partition Pruning : We are not pruning sometimes when we use "is null/not null" in the filter
> ---------------------------------------------------------------------------------------------
>
> Key: DRILL-3636
> URL: https://issues.apache.org/jira/browse/DRILL-3636
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 1.2.0
> Reporter: Rahul Challapalli
> Assignee: Jinfeng Ni
> Fix For: 1.2.0
>
>
> git.commit.id.abbrev=b23e837
> Partition pruning not taking place in the below case
> {code}
> explain plan for select count(*) from `/drill/testdata/partition_pruning/dfs/lineitempart` where case when dir0=1991 then null else 1 end is null;
> +------+------+
> | text | json |
> +------+------+
> | 00-00 Screen
> 00-01 Project(EXPR$0=[$0])
> 00-02 StreamAgg(group=[{}], EXPR$0=[COUNT()])
> 00-03 Project($f0=[0])
> 00-04 SelectionVectorRemover
> 00-05 Filter(condition=[IS NULL(CASE(=($0, 1991), null, 1))])
> 00-06 Scan(groupscan=[EasyGroupScan [selectionRoot=maprfs:/drill/testdata/partition_pruning/dfs/lineitempart, numFiles=7, columns=[`dir0`], files=[maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1991/lineitemaa.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1992/lineitemab.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1996/lineitemaf.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1994/lineitemad.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1993/lineitemac.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1997/lineitemag.tbl, maprfs:/drill/testdata/partition_pruning/dfs/lineitempart/1995/lineitemae.tbl]]])
> {code}
> Attached the data set
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)