docete commented on a change in pull request #1687: [CALCITE-3612] Add 
TIME/TIMESTAMP WITH TIME ZONE in optimizer
URL: https://github.com/apache/calcite/pull/1687#discussion_r361270113
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/RexProgramTest.java
 ##########
 @@ -2223,15 +2212,27 @@ private void checkExponentialCnf(int n) {
     final RexLiteral literalTimeLTZ =
         rexBuilder.makeTimeWithLocalTimeZoneLiteral(
             new TimeString(1, 23, 45), 0);
+    final RexLiteral timeChar = rexBuilder.makeLiteral("12:34:45");
     final RexLiteral timeLTZChar1 = rexBuilder.makeLiteral("12:34:45 
America/Los_Angeles");
     final RexLiteral timeLTZChar2 = rexBuilder.makeLiteral("12:34:45 UTC");
     final RexLiteral timeLTZChar3 = rexBuilder.makeLiteral("12:34:45 GMT+01");
+    final RexLiteral timestampChar = rexBuilder.makeLiteral("2011-07-20 
12:34:56");
     final RexLiteral timestampLTZChar1 = rexBuilder.makeLiteral("2011-07-20 
12:34:56 Asia/Tokyo");
     final RexLiteral timestampLTZChar2 = rexBuilder.makeLiteral("2011-07-20 
12:34:56 GMT+01");
     final RexLiteral timestampLTZChar3 = rexBuilder.makeLiteral("2011-07-20 
12:34:56 UTC");
     final RexLiteral literalTimestampLTZ =
         rexBuilder.makeTimestampWithLocalTimeZoneLiteral(
             new TimestampString(2011, 7, 20, 8, 23, 45), 0);
+    final RexLiteral literalTimeWithTZ =
+        rexBuilder.makeTimeWithTimeZoneLiteral(
+            new TimeWithTimeZoneString(
+                new TimeString(1, 23, 45),
+                TimeZone.getTimeZone("Asia/Shanghai")), 0);
+    final RexLiteral literalTimestampWithTZ =
+        rexBuilder.makeTimestampWithTimeZoneLiteral(
+            new TimestampWithTimeZoneString(
+                new TimestampString(2017, 7, 20, 8, 23, 45),
 
 Review comment:
   I noticed the TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE also ignored 
precision in RexToLixTranslator. See cast(TIMESTAMP as CHAR), I think we should 
follow that. And we could open another ticket to support precision of them.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to