snuyanzin commented on code in PR #30214:
URL: https://github.com/apache/flink/pull/30214#discussion_r4754563812
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/DateTimeUtils.java:
##########
@@ -764,23 +770,61 @@ private static boolean isValidTime(int hour, int minute,
int second) {
&& second <= 59;
}
+ /**
+ * The number in {@code v[from, to)}, without the whitespace around it
that {@link String#trim}
+ * removes, or -1 when it is empty or has a character other than a digit.
Reads it in place, so
+ * that parsing a date or a time makes no strings.
+ */
+ private static int parseDateTimePart(String v, int from, int to) {
Review Comment:
it will not give much benefit on the other side it will introduce autoboxing,
since it is runtime code I would better avoid that
at the same time I simplified the method itself
--
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]