You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/06/13 21:35:53 UTC

svn commit: r1492828 - in /hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector: VectorHashKeyWrapper.java VectorHashKeyWrapperBatch.java

Author: hashutosh
Date: Thu Jun 13 19:35:52 2013
New Revision: 1492828

URL: http://svn.apache.org/r1492828
Log:
HIVE-4716 : Classcast exception with two group by keys of types string and tinyint. (Remus Rusanu via Ashutosh Chauhan)

Modified:
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java
    hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java?rev=1492828&r1=1492827&r2=1492828&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapper.java Thu Jun 13 19:35:52 2013
@@ -142,7 +142,7 @@ public class VectorHashKeyWrapper extend
     clone.byteLengths = byteLengths.clone();
     for (int i = 0; i < byteValues.length; ++i) {
       // avoid allocation/copy of nulls, because it potentially expensive. branch instead.
-      if (!isNull[i]) {
+      if (!isNull[longValues.length + doubleValues.length + i]) {
         clone.byteValues[i] = Arrays.copyOfRange(
             byteValues[i],
             byteStarts[i],

Modified: hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java?rev=1492828&r1=1492827&r2=1492828&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java (original)
+++ hive/branches/vectorization/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorHashKeyWrapperBatch.java Thu Jun 13 19:35:52 2013
@@ -471,7 +471,7 @@ public class VectorHashKeyWrapperBatch {
       } else if (outputType.equalsIgnoreCase("string")) {
         indexLookup[i].longIndex = -1;
         indexLookup[i].doubleIndex = -1;
-        stringIndices[i]= stringIndicesIndex;
+        stringIndices[stringIndicesIndex]= i;
         ++stringIndicesIndex;
       }
       else {