mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #10783 from ClickHouse/date-lut-asserts
Asserts in DateLUTImpl
This commit is contained in:
commit
52b2b4c2c0
@ -75,6 +75,11 @@ DateLUTImpl::DateLUTImpl(const std::string & time_zone_)
|
||||
values.day_of_week = getDayOfWeek(date);
|
||||
values.date = start_of_day;
|
||||
|
||||
assert(values.year >= DATE_LUT_MIN_YEAR && values.year <= DATE_LUT_MAX_YEAR);
|
||||
assert(values.month >= 1 && values.month <= 12);
|
||||
assert(values.day_of_month >= 1 && values.day_of_month <= 31);
|
||||
assert(values.day_of_week >= 1 && values.day_of_week <= 7);
|
||||
|
||||
if (values.day_of_month == 1)
|
||||
{
|
||||
cctz::civil_month month(date);
|
||||
|
Loading…
Reference in New Issue
Block a user