gortiz commented on code in PR #14398:
URL: https://github.com/apache/pinot/pull/14398#discussion_r1834236954
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/DataSchema.java:
##########
@@ -490,12 +540,24 @@ public Object toInternal(Object value) {
return ((boolean) value) ? 1 : 0;
case TIMESTAMP:
return ((Timestamp) value).getTime();
+ case TIMESTAMP_NTZ:
+ return ((LocalDateTime)
value).atZone(ZoneId.of("UTC")).toInstant().toEpochMilli();
Review Comment:
In this specific case, this can be rewritten with (AFAIK) zero allocation
with:
```suggestion
return ((LocalDateTime) value).toEpochSecond(ZoneOffset.UTC) *
1000;
```
--
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]