bitblender commented on a change in pull request #1444: DRILL-6709: Extended 
the batch stats utility to other operators
URL: https://github.com/apache/drill/pull/1444#discussion_r212787951
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggBatch.java
 ##########
 @@ -204,7 +204,12 @@ public HashAggBatch(HashAggregate popConfig, RecordBatch 
incoming, FragmentConte
     }
 
     hashAggMemoryManager = new HashAggMemoryManager(configuredBatchSize);
-    logger.debug("BATCH_STATS, configured output batch size: {}", 
configuredBatchSize);
+
+    if (isRecordBatchStatsLoggingEnabled()) {
 
 Review comment:
   This outer check is unnecessary because logRecordBatchStats does the same 
check. I guess you have it here just to avoid the cost of String.format(). 
Maybe we should add a var args version which does the string.format internally? 
When reading code, I personally like it when I can read as much of the real 
function logic in one page, large bodies of logging code make this harder.  I 
realize it is just 2 extra lines per logging location but it makes it more 
verbose. 
   
   That said, if you are using an outer check, it allows you to use the "+" 
string builder and not use String.format(). String.format() is prone to 
mismatch errors between the order in the format string and the order in the 
variable list.
   
   This is more of a style comment. I will be ok if you don't change it now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to