zratkai commented on code in PR #5421:
URL: https://github.com/apache/hive/pull/5421#discussion_r1751461162
##########
common/src/java/org/apache/hadoop/hive/common/type/Date.java:
##########
@@ -84,7 +84,7 @@ public class Date implements Comparable<Date> {
private static final LocalDate EPOCH = LocalDate.of(1970, 1, 1);
private static final DateTimeFormatter PARSE_FORMATTER =
- new DateTimeFormatterBuilder().appendValue(YEAR, 1, 10,
SignStyle.NORMAL).appendLiteral('-')
+ new DateTimeFormatterBuilder().appendValue(YEAR, 1, 4,
SignStyle.NORMAL).appendLiteral('-')
Review Comment:
Years must be not 4 characters long, since date 1-1-1, 45-10-20, 457-05-16,
896-08-01 are valid dates, and as we allow the month and days to be one or two
characters long it would be strange to say, years must be at least 4 character
long, but it can be 10 character long. Most of the programming languages
support dates up to years 9999 or even less, so we are good with that limit.
--
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]