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

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #8118: Infer SDF for Timestamp in dimension field spec

Jackie-Jiang commented on code in PR #8118:
URL: https://github.com/apache/pinot/pull/8118#discussion_r846512405


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/TimestampUtils.java:
##########
@@ -19,19 +19,27 @@
 package org.apache.pinot.spi.utils;
 
 import java.sql.Timestamp;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 
 
 public class TimestampUtils {
+
+  private static final String[] SDF_FORMATS = {
+      "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",

Review Comment:
   Let's order the format based on how common they are used:
   IMO the following 3 are the most commonly used besides the standard format:
   `yyyy-MM-dd'T'HH:mm:ssZ`
   `yyyy-MM-dd'T'HH:mm:ss.SSSZ`
   `yyyy-MM-dd`



##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/TimestampUtils.java:
##########
@@ -19,19 +19,27 @@
 package org.apache.pinot.spi.utils;
 
 import java.sql.Timestamp;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 
 
 public class TimestampUtils {
+
+  private static final String[] SDF_FORMATS = {
+      "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",

Review Comment:
   `yyyy-MM-dd'T'HH:mm:ss'Z'` is covered by `yyyy-MM-dd'T'HH:mm:ssZ`



-- 
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@pinot.apache.org

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


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