[
https://issues.apache.org/jira/browse/DRILL-3560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653902#comment-14653902
]
Jinfeng Ni commented on DRILL-3560:
-----------------------------------
Copied from drill users list:
{code}
select count(*) from dfs.tmp.`/analytics/processed/test/events` as t
where dir0 = dirInRange(cast('2015-04-10' as timestamp),cast('2015-07-11'
as timestamp),COALESCE(dir0,'-')) and dir1 = dirInRange(cast('2015-04-10'
as timestamp),cast('2015-07-11' as
timestamp),COALESCE(dir0,'-'),COALESCE(dir1,'-'));
{code}
The query uses a UDF (dirInRange) that operates solely on
static+directory information, which seems to make partition pruning not work.
> Make partition pruning work for directory queries
> -------------------------------------------------
>
> Key: DRILL-3560
> URL: https://issues.apache.org/jira/browse/DRILL-3560
> Project: Apache Drill
> Issue Type: New Feature
> Components: Query Planning & Optimization
> Affects Versions: 1.1.0
> Reporter: Stefán Baxter
> Assignee: Aman Sinha
> Attachments: table.tar
>
>
> Currently queries that include directory conditions are not optimized at all
> and the directory expression (dir0 = 'something') is evaluated for every
> record of every file for every directory.
> This could be optimized to fail directories and allow for the same kind of
> partition pruning for directories as for other scenarios where data has been
> partitioned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)