[ https://issues.apache.org/jira/browse/DRILL-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kunal Khatua closed DRILL-2517.
-------------------------------
Create a table with 25 directories at level 0 (1991-2015) and each having 4 sub directories
(Q1-Q4); each directory having 3.3K files (each about 2.5KB)... totaling nearly 330K files
(total size of 767MB).
Drill 1.5.0
0: jdbc:drill:schema=dfs.drill2517> explain plan for select * from dfs.`/tpchParquet/miniFiles/lineitem`
where dir0= 1990 and dir1 = 'Q1';
+------+------+
| text | json |
+------+------+
| 00-00 Screen
00-01 Project(*=[$0])
00-02 Project(T0¦¦*=[$0])
00-03 SelectionVectorRemover
00-04 Filter(condition=[AND(=($1, 1990), =($2, 'Q1'))])
00-05 Project(T0¦¦*=[$0], dir0=[$1], dir1=[$2])
00-06 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/tpchParquet/miniFiles/lineitem/1991/Q2/0_0_127745.parquet]],
selectionRoot=maprfs:/tpchParquet/miniFiles/lineitem, numFiles=1, usedMetadataFile=false,
columns=[`*`]]])
| {...}|
1 row selected (371.543 seconds)
Drill 1.6.0
0: jdbc:drill:schema=dfs.drill2517> explain plan for select * from dfs.`/tpchParquet/miniFiles/lineitem`
where dir0= 1990 and dir1 = 'Q1';
+------+------+
| text | json |
+------+------+
| 00-00 Screen
00-01 Project(*=[$0])
00-02 Project(T1¦¦*=[$0])
00-03 SelectionVectorRemover
00-04 Filter(condition=[AND(=($1, 1990), =($2, 'Q1'))])
00-05 Project(T1¦¦*=[$0], dir0=[$1], dir1=[$2])
00-06 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=/tpchParquet/miniFiles/lineitem/2013/Q2/0_0_210249.parquet]],
selectionRoot=maprfs:/tpchParquet/miniFiles/lineitem, numFiles=1, usedMetadataFile=false,
columns=[`*`]]])
| {...} |
+------+------+
1 row selected (7.721 seconds)
> Apply Partition pruning before reading files during planning
> ------------------------------------------------------------
>
> Key: DRILL-2517
> URL: https://issues.apache.org/jira/browse/DRILL-2517
> Project: Apache Drill
> Issue Type: New Feature
> Components: Query Planning & Optimization
> Affects Versions: 0.7.0, 0.8.0
> Reporter: Adam Gilmore
> Assignee: Kunal Khatua
> Fix For: 1.6.0, Future
>
>
> 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)
|