small fixes for Date32

This commit is contained in:
Yarik Briukhovetskyi 2024-09-04 16:56:07 +02:00 committed by GitHub
parent 6acb5ab5a1
commit 018a62777b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -292,13 +292,13 @@ private:
case IntervalKind::Kind::Nanosecond:
case IntervalKind::Kind::Microsecond:
case IntervalKind::Kind::Millisecond:
if (isDate(time_data_type) || isDateTime(time_data_type))
if (isDateOrDate32(time_data_type) || isDateTime(time_data_type))
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal interval kind for argument data type {}", isDate(time_data_type) ? "Date" : "DateTime");
break;
case IntervalKind::Kind::Second:
case IntervalKind::Kind::Minute:
case IntervalKind::Kind::Hour:
if (isDate(time_data_type))
if (isDateOrDate32(time_data_type))
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal interval kind for argument data type Date");
break;
default: