AMashenkov commented on code in PR #941:
URL: https://github.com/apache/ignite-3/pull/941#discussion_r921023505


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/TypeUtils.java:
##########
@@ -249,7 +251,9 @@ public static Object toInternal(ExecutionContext<?> ectx, 
Object val, Type stora
         } else if (storageType == LocalTime.class) {
             return (int) (((LocalTime) val).toNanoOfDay() / 1000 / 1000 /* 
convert to millis */);
         } else if (storageType == LocalDateTime.class) {
-            return ((LocalDateTime) val).toEpochSecond(ZoneOffset.UTC);
+            var dt = (LocalDateTime) val;
+
+            return dt.toEpochSecond(ZoneOffset.UTC) * 1000 + dt.getNano() / 
1000 / 1000 /* convert to millis */;

Review Comment:
   ```suggestion
               return 
TimeUnit.SECONDS.toMillis(dt.toEpochSecond(ZoneOffset.UTC)) + 
TimeUnit.NANOSECONDS.toMillis(dt.getNano());
   ```



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

Reply via email to