Merge pull request #13417 from vladimir-golovchenko/fix-quota-statements-interval-formatting

Fix a 'Week'-interval formatting for ATTACH/ALTER/CREATE QUOTA-statements
This commit is contained in:
Alexander Kuzmenkov 2020-08-07 01:50:25 +03:00 committed by GitHub
commit da7bc8962d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,10 +51,10 @@ IntervalKind IntervalKind::fromAvgSeconds(Int64 num_seconds)
return IntervalKind::Year; return IntervalKind::Year;
if (!(num_seconds % 7889238)) if (!(num_seconds % 7889238))
return IntervalKind::Quarter; return IntervalKind::Quarter;
if (!(num_seconds % 604800))
return IntervalKind::Week;
if (!(num_seconds % 2629746)) if (!(num_seconds % 2629746))
return IntervalKind::Month; return IntervalKind::Month;
if (!(num_seconds % 604800))
return IntervalKind::Week;
if (!(num_seconds % 86400)) if (!(num_seconds % 86400))
return IntervalKind::Day; return IntervalKind::Day;
if (!(num_seconds % 3600)) if (!(num_seconds % 3600))