snuyanzin commented on code in PR #28828:
URL: https://github.com/apache/flink/pull/28828#discussion_r3658798457
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/expressions/ValueLiteralExpression.java:
##########
@@ -411,6 +406,51 @@ private static void validateValueDataType(Object value,
DataType dataType) {
}
}
+ /**
+ * Formats a year-month interval value as a SQL literal, including
explicit precision on the
+ * {@code YEAR} field.
+ */
+ private static String formatYearMonthIntervalLiteral(
+ YearMonthIntervalType type, Period period) {
+ final long totalMonths = period.toTotalMonths();
+ final long years = totalMonths / 12;
+ final long months = totalMonths % 12;
Review Comment:
we don't need long here if max value is 11
```suggestion
final int months = totalMonths % 12;
```
--
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]