mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +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.day_of_week = getDayOfWeek(date);
|
||||||
values.date = start_of_day;
|
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)
|
if (values.day_of_month == 1)
|
||||||
{
|
{
|
||||||
cctz::civil_month month(date);
|
cctz::civil_month month(date);
|
||||||
|
Loading…
Reference in New Issue
Block a user