hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject svn commit: r825586 - in /hadoop/hive/trunk: CHANGES.txt ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
Date Thu, 15 Oct 2009 17:46:49 GMT
Author: namit
Date: Thu Oct 15 17:46:48 2009
New Revision: 825586

URL: http://svn.apache.org/viewvc?rev=825586&view=rev
Log:
HIVE-878. Update the hash table entry before flushing in Group By
hash aggregation. (Zheng Shao via namit)


Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=825586&r1=825585&r2=825586&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Thu Oct 15 17:46:48 2009
@@ -185,6 +185,9 @@
 
     HIVE-879. Fix null pointer for empty dir. (Namit Jain via zshao)
 
+    HIVE-878. Update the hash table entry before flushing in Group By
+    hash aggregation. (Zheng Shao via namit)
+
 Release 0.4.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java?rev=825586&r1=825585&r2=825586&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java (original)
+++ hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java Thu
Oct 15 17:46:48 2009
@@ -542,14 +542,17 @@
       newEntryForHashAggr = keysCurrentGroup.add(newDefaultKeys);
     }
 
-    // based on used-specified parameters, check if the hash table needs to be flushed
+    // Update the aggs
+    updateAggregations(aggs, row, rowInspector, true, newEntryForHashAggr, null);
+
+    // We can only flush after the updateAggregations is done, or the potentially new entry
"aggs"
+    // can be flushed out of the hash table.
+    
+    // Based on user-specified parameters, check if the hash table needs to be flushed.
     // If the grouping key is not the same as reduction key, flushing can only happen at
boundaries
     if ((!groupKeyIsNotReduceKey || firstRowInGroup) && shouldBeFlushed(newKeys))
{
       flush(false);
     }
-
-    // Update the aggs
-    updateAggregations(aggs, row, rowInspector, true, newEntryForHashAggr, null);
   }
 
   // Non-hash aggregation



Mime
View raw message