Skip to content

Drill 2517: Apply directory-based partition pruning before reading files in planning.#328

Closed
jinfengni wants to merge 4 commits intoapache:masterfrom
jinfengni:DRILL-2517
Closed

Drill 2517: Apply directory-based partition pruning before reading files in planning.#328
jinfengni wants to merge 4 commits intoapache:masterfrom
jinfengni:DRILL-2517

Conversation

@jinfengni
Copy link
Contributor

  1. Run the pre-commit tests and unit tests. Some queries in pre-commit suites have changed plan. Most of the changed plan looks better than before. The only exception is for the cases caused by one existing issue (DRILL-4279), when * column is used together with SKIP_ALL mode. That happens when the filter is applied and then removed, for the following query:

SELECT count(*) from T1 where dir0 = 1990 and dir1 = 'Q1'.

  1. I need figure out how to cherry-pick Adam's patch in DRILL-2517, since that's the initial work on this issue, although there is quite big change from that patch.

@amansinha100 , could you please take a look and give some initial review comments? Thanks!

@jinfengni jinfengni force-pushed the DRILL-2517 branch 4 times, most recently from 4142787 to 29e2555 Compare January 19, 2016 23:02

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me why a flag is needed to keep track of Calcite logical...ideally this should be handled by the type of the RelNode. We may need to do some refactoring of this rule to separate out the ones that apply during Calcite logical planning vs. Drill logical planning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. The flag is not needed now. I will refactor the rules.

@jinfengni jinfengni force-pushed the DRILL-2517 branch 2 times, most recently from ec5bd95 to d03a075 Compare January 21, 2016 23:53
final FileGroupScan newScan = ((FileGroupScan)scanRel.getGroupScan()).clone(newSelection);
return newScan;
// @Override
// public GroupScan createNewGroupScan(List<String> newFiles) throws IOException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function can be removed completely...

@amansinha100
Copy link

Revised patch looks good to me..other than a few minor comments. +1.

mehant and others added 2 commits January 29, 2016 11:51
… planning phase.

1) Make directory-based pruning rule both work in calcite logical and drill logical planning phase.

2) Only apply directory-based pruning in logical phase when there is no metadata cache.

3) Make FileSelection constructor public, since FileSelection.create() would modify selectionRoot.
@jinfengni
Copy link
Contributor Author

this PR has been merged to drill 1.6.0. Close this PR.

@jinfengni jinfengni closed this Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments