Jackie-Jiang commented on code in PR #9355:
URL: https://github.com/apache/pinot/pull/9355#discussion_r974727851
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SchemaUtils.java:
##########
@@ -198,6 +199,17 @@ private static void
validateDateTimeFieldSpec(DateTimeFieldSpec dateTimeFieldSpe
}
}
+ Object sampleValue = dateTimeFieldSpec.getSampleValue();
+ if (sampleValue != null) {
+ long sampleTimestampValue = (sampleValue instanceof String) ?
formatSpec.fromFormatToMillis((String) sampleValue)
+ : formatSpec.fromFormatToMillis(String.valueOf(sampleValue));
Review Comment:
```suggestion
long sampleTimestampValue;
try {
sampleTimestampValue =
formatSpec.fromFormatToMillis(sampleValue.toString());
} catch (Exception e) {
throw new IllegalArgumentException(...);
}
```
--
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]