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 2021/12/02 18:51:20 UTC

[GitHub] [pinot] walterddr commented on a change in pull request #7804: add validator for SDF

walterddr commented on a change in pull request #7804:
URL: https://github.com/apache/pinot/pull/7804#discussion_r761377818



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/data/DateTimeFormatPatternSpec.java
##########
@@ -52,7 +66,28 @@ public DateTimeFormatPatternSpec(String timeFormat, String sdfPatternWithTz) {
         String timezoneString = m.group(TIMEZONE_GROUP).trim();
         _dateTimeZone = DateTimeZone.forTimeZone(TimeZone.getTimeZone(timezoneString));
       }
+      validateSdfPattern(_sdfPattern, requireLexicographicOrdering);
       _dateTimeFormatter = DateTimeFormat.forPattern(_sdfPattern).withZone(_dateTimeZone).withLocale(DEFAULT_LOCALE);
+
+    }
+  }
+
+  private static void validateSdfPattern(String sdfPattern, boolean requireLexicographicOrdering) {

Review comment:
       actually I can't make it into DateTimeUtils because this class is in pinot-spi and DateTimeUtils is in pinot-common
   




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