mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix assert in parseDateTimeBestEffort
This commit is contained in:
parent
9e97aab3b3
commit
ace4533fae
@ -553,7 +553,7 @@ ReturnType parseDateTimeBestEffortImpl(
|
||||
};
|
||||
|
||||
if (!check_date(is_leap_year, month, day_of_month))
|
||||
return on_error("Cannot read DateTime: logical error, unexpected date: " + std::to_string(year) + "-" + std::to_string(month) + "-" + std::to_string(day_of_month), ErrorCodes::LOGICAL_ERROR);
|
||||
return on_error("Cannot read DateTime: unexpected date: " + std::to_string(year) + "-" + std::to_string(month) + "-" + std::to_string(day_of_month), ErrorCodes::CANNOT_PARSE_DATETIME);
|
||||
|
||||
if (is_pm && hour < 12)
|
||||
hour += 12;
|
||||
|
@ -0,0 +1 @@
|
||||
\N
|
@ -0,0 +1,2 @@
|
||||
select parseDateTime64BestEffort('2.55'); -- { serverError 41 }
|
||||
select parseDateTime64BestEffortOrNull('2.55');
|
Loading…
Reference in New Issue
Block a user