FrankChen021 commented on a change in pull request #12113:
URL: https://github.com/apache/druid/pull/12113#discussion_r777787125



##########
File path: 
processing/src/main/java/org/apache/druid/segment/transform/Transformer.java
##########
@@ -170,15 +174,16 @@ public long getTimestampFromEpoch()
       }
     }
 
+    @Override
+    public long getTimestampFromEpoch()
+    {
+      return timestamp;
+    }
+
     @Override
     public DateTime getTimestamp()
     {
-      final RowFunction transform = 
transforms.get(ColumnHolder.TIME_COLUMN_NAME);
-      if (transform != null) {
-        return DateTimes.utc(getTimestampFromEpoch());
-      } else {
-        return row.getTimestamp();
-      }
+      return DateTimes.utc(getTimestampFromEpoch());

Review comment:
       Why not cache the `DateTime` object instead of the `long`? By doing that 
we can save many temp objects creation.




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