You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by gu...@apache.org on 2014/10/24 08:20:54 UTC

svn commit: r1634003 - in /hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec: MapOperator.java vector/VectorMapOperator.java

Author: gunther
Date: Fri Oct 24 06:20:54 2014
New Revision: 1634003

URL: http://svn.apache.org/r1634003
Log:
HIVE-8586: Record counters aren't updated correctly for vectorized queries (Gunther Hagleitner, reviewed by Vikram Dixit K)

Modified:
    hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
    hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapOperator.java

Modified: hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java?rev=1634003&r1=1634002&r2=1634003&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java (original)
+++ hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java Fri Oct 24 06:20:54 2014
@@ -499,14 +499,16 @@ public class MapOperator extends Operato
         throw new HiveException("Hive Runtime Error while processing row " + message, e);
       }
     }
-    rowForwarded(childrenDone);
+    rowsForwarded(childrenDone, 1);
   }
 
-  protected final void rowForwarded(int childrenDone) {
-    numRows++;
-    if (isLogInfoEnabled && numRows == cntr) {
-      cntr *= 10;
-      LOG.info(toString() + ": records read - " + numRows);
+  protected final void rowsForwarded(int childrenDone, int rows) {
+    numRows += rows;
+    if (isLogInfoEnabled) {
+      while (numRows >= cntr) {
+        cntr *= 10;
+        LOG.info(toString() + ": records read - " + numRows);
+      }
     }
     if (childrenDone == currentCtxs.length) {
       setDone(true);

Modified: hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapOperator.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapOperator.java?rev=1634003&r1=1634002&r2=1634003&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapOperator.java (original)
+++ hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapOperator.java Fri Oct 24 06:20:54 2014
@@ -46,7 +46,8 @@ public class VectorMapOperator extends M
           childrenDone++;
         }
       }
-      rowForwarded(childrenDone);
+
+      rowsForwarded(childrenDone, ((VectorizedRowBatch)value).size);
     } catch (Exception e) {
       throw new HiveException("Hive Runtime Error while processing row ", e);
     }