mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 09:10:48 +00:00
Fixed parsing DateTime64 as unix timestamp with subsecond precision scaled to integer.
e.g. toDateTime64('1111111111222', 3)
This commit is contained in:
parent
c882d290bd
commit
0f7c83b5ac
@ -774,7 +774,7 @@ inline ReturnType readDateTimeTextImpl(DateTime64 & datetime64, UInt32 scale, Re
|
||||
++buf.position();
|
||||
}
|
||||
//9908870400 is time_t value for 2084-01-01 UTC (a bit over the last year supported by DateTime64)
|
||||
else if (scale && scale < 18 && (whole >= 9908870400LL * static_cast<int64_t>(intExp10(scale))))
|
||||
else if (whole >= 9908870400LL)
|
||||
{
|
||||
/// Unix timestamp with subsecond precision, already scaled to integer.
|
||||
/// For disambiguation we support only time since 2001-09-09 01:46:40 UTC and less than 30 000 years in future.
|
||||
|
Loading…
Reference in New Issue
Block a user