You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/03/21 15:00:35 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #1120: [CALCITE-2933] Add timestamp extract for casts from timestamp type to…

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:
users@infra.apache.org


With regards,
Apache Git Services