[ 
https://issues.apache.org/jira/browse/HIVE-23627?focusedWorklogId=442005&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-442005
 ]

ASF GitHub Bot logged work on HIVE-23627:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jun/20 19:33
            Start Date: 05/Jun/20 19:33
    Worklog Time Spent: 10m 
      Work Description: pgaref commented on a change in pull request #1067:
URL: https://github.com/apache/hive/pull/1067#discussion_r436123334



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
##########
@@ -990,24 +955,17 @@ private void flushHashTable(boolean complete) throws 
HiveException {
     // changed in the future
 
     if (complete) {
-      Iterator<Map.Entry<KeyWrapper, AggregationBuffer[]>> iter = 
hashAggregations
-          .entrySet().iterator();
-      while (iter.hasNext()) {
-        Map.Entry<KeyWrapper, AggregationBuffer[]> m = iter.next();
-        forward(m.getKey().getKeyArray(), m.getValue());
+      for (Map.Entry<KeyWrapper, AggregationBuffer[]> entry : 
hashAggregations.entrySet()) {
+        forward(entry.getKey().getKeyArray(), entry.getValue());
       }
-      hashAggregations.clear();
       hashAggregations = null;
-      if (LOG.isInfoEnabled()) {
-        LOG.info("Hash Table completed flushed");
-      }
+      LOG.info("Hash Table completed flushed");
       return;
     }
 
     int oldSize = hashAggregations.size();
-    if (LOG.isInfoEnabled()) {
-      LOG.info("Hash Tbl flush: #hash table = " + oldSize);
-    }
+    LOG.info("Hash Tbl flush: #hash table = " + oldSize);

Review comment:
       Hey @belugabehr -- thanks for the detailed comment!
   Tbh I was under the impression that the flush size message above was on 
debug mode -- we are on the same page on this!
   
   There are several places in the project were we check `if 
(LOG.isDebugEnabled())` before doing the logging, however, this is completely 
redundant (if we have less than 3 arguments as you pointed out correctly below).
   For Log.info mode, as you said, it is more like a matter of consistency.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 442005)
    Time Spent: 1h 20m  (was: 1h 10m)

> Review of GroupByOperator
> -------------------------
>
>                 Key: HIVE-23627
>                 URL: https://issues.apache.org/jira/browse/HIVE-23627
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to