Jackie-Jiang commented on a change in pull request #7804:
URL: https://github.com/apache/pinot/pull/7804#discussion_r763559998
##########
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:
In order to ingest such column as time column, it has to be converted to
lexicographic order to prevent unexpected query result. It can be done via the
ingestion transform. We should make it clear in our documentation
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]