henrib commented on code in PR #4749:
URL: https://github.com/apache/hive/pull/4749#discussion_r1347394073


##########
common/src/java/org/apache/hadoop/hive/ql/log/PerfLogger.java:
##########
@@ -203,11 +194,12 @@ public boolean endTimeHasMethod(String method) {
   }
 
   public Long getDuration(String method) {
-    long duration = 0;
-    if (startTimes.containsKey(method) && endTimes.containsKey(method)) {
-      duration = endTimes.get(method) - startTimes.get(method);
+    Long startTime = startTimes.get(method);
+    Long endTime = endTimes.get(method);
+    if (startTime != null && endTime != null) {
+      return endTime.longValue() - startTime.longValue();

Review Comment:
   Yes and signature does not really need to be a Long (vs long).



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to