twalthr commented on code in PR #28146:
URL: https://github.com/apache/flink/pull/28146#discussion_r3227569437
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java:
##########
@@ -380,6 +388,15 @@ private static TimestampData epochToTimestampData(long
epoch, int precision) {
return TimestampData.fromInstant(Instant.ofEpochSecond(epochSeconds,
nanoAdjustment));
}
+ private static void validatePrecision(int precision) {
+ if (precision < MIN_PRECISION || precision > MAX_PRECISION) {
+ throw new TableRuntimeException(
+ String.format(
+ "Precision for TO_TIMESTAMP_LTZ must be between %d
and %d but was %d.",
+ MIN_PRECISION, MAX_PRECISION, precision));
+ }
+ }
Review Comment:
Thanks for rechecking this!
--
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]