DRILL-1664: Count(*) returns incorrect result for a parquet file with repeated 
data.


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/31f2d47c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/31f2d47c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/31f2d47c

Branch: refs/heads/master
Commit: 31f2d47c23f8f924e663ee5e34dd55fff1e6a1c3
Parents: ade74b1
Author: Jason Altekruse <altekruseja...@gmail.com>
Authored: Thu Nov 13 15:28:34 2014 -0800
Committer: Jason Altekruse <altekruseja...@gmail.com>
Committed: Thu Nov 13 15:28:34 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/31f2d47c/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
index 7882b66..07532d1 100644
--- 
a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
+++ 
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
@@ -254,7 +254,7 @@ public class ParquetGroupScan extends AbstractFileGroupScan 
{
           logger.debug("rowGroupInfo path: {} start: {} length {}", filePath, 
start, length);
           index++;
 
-          rowCount += valueCountInGrp;
+          rowCount += rowGroup.getRowCount();
         }
       }
     }

Reply via email to