danny0405 commented on a change in pull request #1120: [CALCITE-2933] Add 
timestamp extract for casts from timestamp type to…
URL: https://github.com/apache/calcite/pull/1120#discussion_r267800204
 
 

 ##########
 File path: druid/src/main/java/org/apache/calcite/adapter/druid/DruidQuery.java
 ##########
 @@ -241,6 +241,14 @@ public static DruidQuery extendQuery(DruidQuery query,
         query.druidTable, intervals, query.rels, 
query.getOperatorConversionMap());
   }
 
+  /** Check if it is needed to use UTC for DATE and TIMESTAMP types. **/
+  private static boolean needUTCTimeExtract(RexNode rexNode) {
+    return rexNode.getType().getSqlTypeName() == SqlTypeName.DATE
+        || rexNode.getType().getSqlTypeName() == SqlTypeName.TIMESTAMP
+        || rexNode.getType().getSqlTypeName()
+        == SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE;
 
 Review comment:
   renamed, thx for the review, Julian

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