zstan commented on code in PR #13569:
URL: https://github.com/apache/ignite/pull/13569#discussion_r4024502905


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/TypeUtils.java:
##########
@@ -435,15 +464,15 @@ public static Object fromInternal(DataContext ctx, Object 
val, Type storageType)
         else if (storageType == java.sql.Date.class && val instanceof Integer)
             return new java.sql.Date(fromLocalTs(ctx, (Integer)val * 
DateTimeUtils.MILLIS_PER_DAY));
         else if (storageType == LocalDate.class && val instanceof Integer)
-            return new java.sql.Date(fromLocalTs(ctx, (Integer)val * 
DateTimeUtils.MILLIS_PER_DAY)).toLocalDate();
+            return LocalDate.ofEpochDay((Integer)val);

Review Comment:
   all these GRIGORIAN cut over is very hard for understanding and i think you 
in wrong way here, look - i reviert all changes in this class and store only 
line: 467 and 475 i.e. : 
   return LocalDate.ofEpochDay((Integer)val);
   and
   return LocalDateTime.ofInstant(Instant.ofEpochMilli((Long)val), 
ZoneOffset.UTC);
   and **testJavaTimeFunctionsDuringDstTransition** passes for literals and 
fails for dyn params -thus problem is in dyn params treating, i also know that 
AI2 work not perfectly well with Local* historically by design .. probably you 
can also check appropriate AI3 code



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