You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by amansinha100 <gi...@git.apache.org> on 2016/08/23 16:10:06 UTC

[GitHub] drill pull request #575: DRILL-4857: Maintain pruning status and populate Pa...

GitHub user amansinha100 opened a pull request:

    https://github.com/apache/drill/pull/575

    DRILL-4857: Maintain pruning status and populate ParquetGroupScan's e\u2026

    \u2026ntries field with only the selection root if no partition pruning was done.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/amansinha100/incubator-drill DRILL-4857-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/575.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #575
    
----
commit 67c8f48a49a880740bc8d147e90818bb20da6455
Author: Aman Sinha <as...@maprtech.com>
Date:   2016-08-23T02:03:13Z

    DRILL-4857: Maintain pruning status and populate ParquetGroupScan's entries field with only the selection root if no partition pruning was done.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #575: DRILL-4857: Maintain pruning status and populate Pa...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/575#discussion_r75964268
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java ---
    @@ -173,8 +173,18 @@ public ParquetGroupScan( //
         final FileSelection fileSelection = expandIfNecessary(selection);
     
         this.entries = Lists.newArrayList();
    -    for (String fileName : fileSelection.getFiles()) {
    -      entries.add(new ReadEntryWithPath(fileName));
    +    if (fileSelection.getMetaContext() != null &&
    +        (fileSelection.getMetaContext().wasPruningStarted() &&
    +        ! fileSelection.getMetaContext().wasPruned())) {
    +      // if pruning was attempted and nothing was pruned, initialize the entries with just
    +      // the selection root instead of the fully expanded list to reduce overhead. The fully
    +      // expanded list is already stored as part of the fileSet.
    +      // TODO: at some point we should examine whether the list of entries is absolutely needed.
    --- End diff --
    
    Maybe we log a JIRA for this TODO, so that we keep track of this issue? Seems it makes sense to either use the list of entries, or fileSet, but not both. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #575: DRILL-4857: Maintain pruning status and populate Pa...

Posted by amansinha100 <gi...@git.apache.org>.
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/575#discussion_r75978179
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/partition/PruneScanRule.java ---
    @@ -520,4 +531,10 @@ private static boolean isQualifiedDirPruning(final TableScan scan) {
         return false;
       }
     
    +  private static void setNotPruned(MetadataContext metaContext) {
    --- End diff --
    
    yes, I will create the common method. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #575: DRILL-4857: Maintain pruning status and populate Pa...

Posted by amansinha100 <gi...@git.apache.org>.
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/575#discussion_r75978095
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java ---
    @@ -173,8 +173,18 @@ public ParquetGroupScan( //
         final FileSelection fileSelection = expandIfNecessary(selection);
     
         this.entries = Lists.newArrayList();
    -    for (String fileName : fileSelection.getFiles()) {
    -      entries.add(new ReadEntryWithPath(fileName));
    +    if (fileSelection.getMetaContext() != null &&
    +        (fileSelection.getMetaContext().wasPruningStarted() &&
    +        ! fileSelection.getMetaContext().wasPruned())) {
    +      // if pruning was attempted and nothing was pruned, initialize the entries with just
    +      // the selection root instead of the fully expanded list to reduce overhead. The fully
    +      // expanded list is already stored as part of the fileSet.
    +      // TODO: at some point we should examine whether the list of entries is absolutely needed.
    --- End diff --
    
    Will create a JIRA.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #575: DRILL-4857: Maintain pruning status and populate Pa...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/575#discussion_r75963852
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/partition/PruneScanRule.java ---
    @@ -520,4 +531,10 @@ private static boolean isQualifiedDirPruning(final TableScan scan) {
         return false;
       }
     
    +  private static void setNotPruned(MetadataContext metaContext) {
    --- End diff --
    
    What about setPruneStatus(MetadataContext metaContext, PruneStatus status)? Then, both setNotPruned() and code on line 437-440 could share this call.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill issue #575: DRILL-4857: Maintain pruning status and populate ParquetGr...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on the issue:

    https://github.com/apache/drill/pull/575
  
    +1 
    LGTM.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] drill pull request #575: DRILL-4857: Maintain pruning status and populate Pa...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/drill/pull/575


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---