You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Adam Gilmore (JIRA)" <ji...@apache.org> on 2015/03/23 07:29:10 UTC

[jira] [Commented] (DRILL-2517) Partition pruning still reading files during planning

    [ https://issues.apache.org/jira/browse/DRILL-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14375451#comment-14375451 ] 

Adam Gilmore commented on DRILL-2517:
-------------------------------------

https://github.com/AdamPD/drill/commit/ac68320dcdba55f1a148bed925cc6dd24c4f120f

I started a bit of work on solving this particular issue.  In this case, the partition pruning runs before the DrillPushProjIntoScan rule.

I'm not entirely happy with this implementation, though:

1. Currently FileGroupScan has the "supportsPartitionFilterPushdown" method (which is no longer being called).  I would have thought the FormatPlugin would be the best place for this, but I don't fully understand the reasons behind it.

2. I added modifySelection to DrillTable.  I note AbstractFileGroupScan has something very similar, but it also feels a bit dirty as it was immutable before.  There doesn't seem to be a way around it though without going straight to a DrillScanRel, which seems not the job of the partition pruning.

It would be good to get some comments on this from those more familiar with the partition pruning.

> Partition pruning still reading files during planning
> -----------------------------------------------------
>
>                 Key: DRILL-2517
>                 URL: https://issues.apache.org/jira/browse/DRILL-2517
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.7.0, 0.8.0
>            Reporter: Adam Gilmore
>            Assignee: Jinfeng Ni
>
> Partition pruning still tries to read Parquet files during the planning stage even though they don't match the partition filter.
> For example:
> {code}
> 0: jdbc:drill:zk=local> select sum(price) from dfs.tmp.purchases where dir0 = 1;
> Query failed: IllegalArgumentException: file:/tmp/purchases/4/0_0_0.parquet is not a Parquet file (too small)
> {code}
> The reason is that the partition pruning happens after the Parquet plugin tries to read the footer of each file.
> Ideally, partition pruning would happen first before the format plugin gets involved.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)