jcamachor commented on a change in pull request #970: Hive 23100
URL: https://github.com/apache/hive/pull/970#discussion_r409975908
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java
 ##########
 @@ -936,14 +678,10 @@ protected RexNode convert(ExprNodeConstantDesc literal) 
throws CalciteSemanticEx
       break;
     case TIMESTAMPLOCALTZ:
       final TimestampString tsLocalTZString;
-      if (value == null) {
-        tsLocalTZString = null;
-      } else {
-        Instant i = ((TimestampTZ)value).getZonedDateTime().toInstant();
-        tsLocalTZString = TimestampString
-            .fromMillisSinceEpoch(i.toEpochMilli())
-            .withNanos(i.getNano());
-      }
+      Instant i = ((TimestampTZ)value).getZonedDateTime().toInstant();
 
 Review comment:
   `value` cannot be null if we are here (note the check in L569). For the rest 
of types, sometimes there is a check on null value indeed, but it is because 
value is not final and it is replaced within those case blocks.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to