drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansinha100 <...@git.apache.org>
Subject [GitHub] drill pull request #519: DRILL-4530: Optimize partition pruning with metadat...
Date Tue, 12 Jul 2016 21:19:00 GMT
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/519#discussion_r70524553
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
---
    @@ -607,7 +607,14 @@ public long getRowCount() {
           fileSet = Sets.newHashSet(fileNames);
         }
     
    -    if (fileNames.isEmpty()) {
    +    List<String> finalFileNames;
    +    if (fileSet != null) {
    +      finalFileNames = Lists.newArrayList(fileSet);
    --- End diff --
    
    Actually, fileNames can contain duplicates whereas fileSet has a unique list.  fileSet
was already present in the code earlier and used by removeUnneededRowGroups().  I am leveraging
fileSet because when expanding directories it may be possible to end up with duplicate files
which we don't want.   I could perhaps add a comment here. 


---
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.
---

Mime
View raw message