[
https://issues.apache.org/jira/browse/DRILL-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14377053#comment-14377053
]
Adam Gilmore commented on DRILL-2517:
-------------------------------------
That makes sense - I didn't feel right about changing the immutable nature of
it.
I understand the point about it being an optimizer rule and shouldn't change
the query output, but it does make it concerning that we can't avoid
directories explicitly. For example, if I wanted to have queries occurring on
a directory while a new Parquet file was being created in a subdirectory, it'd
start erroring.
Partition "pruning" in the table name sounds good, but I couldn't do the
equivalent of "WHERE dir0 IN (1, 4, 9, 12)" using that, I imagine.
Can you think of another way this could be accomplished?
> 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: Aman Sinha
>
> Partition pruning still tries to read Parquet files during the planning stage
> even though they don't match the partition filter.
> For example, if there were an invalid Parquet file in a directory that should
> not be queried:
> {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)