[regression](datev2) add schema change cases for datev2/datetimev2 (#11924)

This commit is contained in:
Gabriel
2022-08-19 21:29:24 +08:00
committed by GitHub
parent b4101d46f0
commit d83c11a032
9 changed files with 882 additions and 13 deletions

View File

@ -431,6 +431,10 @@ public class DateLiteral extends LiteralExpr {
minute = getOrDefault(dateTime, ChronoField.MINUTE_OF_HOUR, 0);
second = getOrDefault(dateTime, ChronoField.SECOND_OF_MINUTE, 0);
microsecond = getOrDefault(dateTime, ChronoField.MICRO_OF_SECOND, 0);
if (microsecond != 0 && type.isDatetime()) {
LOG.warn("Microseconds is not supported by Datetime type and hence is ignored."
+ "Please change to Datetimev2 to use it.");
}
this.type = type;
if (checkRange() || checkDate()) {
throw new AnalysisException("Datetime value is out of range");