xiangfu0 commented on code in PR #8960:
URL: https://github.com/apache/pinot/pull/8960#discussion_r905588167


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/DateTimeFieldSpec.java:
##########
@@ -70,17 +72,8 @@ public DateTimeFieldSpec() {
    */
   public DateTimeFieldSpec(String name, DataType dataType, String format, 
String granularity) {
     super(name, dataType, true);
-    Preconditions.checkNotNull(name);
-    Preconditions.checkNotNull(dataType);
-    if (Character.isDigit(format.charAt(0))) {
-      DateTimeFormatSpec.validateFormat(format);
-    } else {
-      DateTimeFormatSpec.validatePipeFormat(format);
-    }
-    DateTimeGranularitySpec.validateGranularity(granularity);
-
-    _format = format;
-    _granularity = granularity;
+    setFormat(format);

Review Comment:
   Will json serde work correctly for this class? Maybe add a test for serde 
and comparison ?



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

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


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

Reply via email to