You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/04/21 10:52:44 UTC

[GitHub] [druid] FrankChen021 commented on a diff in pull request #12407: SQL: Create millisecond precision timestamp literals.

FrankChen021 commented on code in PR #12407:
URL: https://github.com/apache/druid/pull/12407#discussion_r855053032


##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java:
##########
@@ -82,12 +83,18 @@
 
   private static final DateTimeFormatter CALCITE_TIME_PRINTER = DateTimeFormat.forPattern("HH:mm:ss.S");
   private static final DateTimeFormatter CALCITE_DATE_PRINTER = DateTimeFormat.forPattern("yyyy-MM-dd");
-  private static final DateTimeFormatter CALCITE_TIMESTAMP_PRINTER = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.S");
+  private static final DateTimeFormatter CALCITE_TIMESTAMP_PRINTER =
+      DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss.SSS");
 
   private static final Charset DEFAULT_CHARSET = Charset.forName(ConversionUtil.NATIVE_UTF16_CHARSET_NAME);
 
   private static final Pattern TRAILING_ZEROS = Pattern.compile("\\.?0+$");
 
+  /**
+   * Milliseconds precision.
+   */
+  private final static int TIMESTAMP_LITERAL_PRECISION = 3;

Review Comment:
   ```suggestion
     private static final int TIMESTAMP_LITERAL_PRECISION = 3;
   ```
   
   This fixes the checkstyle checking.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org