drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meh...@apache.org
Subject [3/3] drill git commit: DRILL-2072: Fix getGroupCount() in RepeatedMapVector
Date Tue, 27 Jan 2015 23:07:30 GMT
DRILL-2072: Fix getGroupCount() in RepeatedMapVector


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

Branch: refs/heads/master
Commit: 47dd6a689178c52035199db572bd93e7d5db9659
Parents: 3e33880
Author: Mehant Baid <mehantr@gmail.com>
Authored: Mon Jan 26 13:33:35 2015 -0800
Committer: Mehant Baid <mehantr@gmail.com>
Committed: Mon Jan 26 22:00:31 2015 -0800

----------------------------------------------------------------------
 .../org/apache/drill/exec/vector/complex/RepeatedMapVector.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/47dd6a68/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
index c75d0e2..7e1b353 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/RepeatedMapVector.java
@@ -487,7 +487,8 @@ public class RepeatedMapVector extends AbstractContainerVector implements
Repeat
 
     @Override
     public int getGroupCount() {
-      return offsets.getAccessor().getValueCount() - 1;
+      final int valueCount = offsets.getAccessor().getValueCount();
+      return valueCount == 0 ? 0 : valueCount - 1;
     }
   }
 


Mime
View raw message