mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
fix for origin
This commit is contained in:
parent
63b0d13a62
commit
c5ba8eb477
@ -192,6 +192,8 @@ public:
|
|||||||
case ResultType::DateTime64:
|
case ResultType::DateTime64:
|
||||||
{
|
{
|
||||||
UInt32 scale = 0;
|
UInt32 scale = 0;
|
||||||
|
if (isDateTime64(arguments[0].type) && overload == Overload::Origin)
|
||||||
|
scale = assert_cast<const DataTypeDateTime64 &>(*arguments[0].type.get()).getScale();
|
||||||
if (interval_type->getKind() == IntervalKind::Kind::Nanosecond)
|
if (interval_type->getKind() == IntervalKind::Kind::Nanosecond)
|
||||||
scale = (9 > scale) ? 9 : scale;
|
scale = (9 > scale) ? 9 : scale;
|
||||||
else if (interval_type->getKind() == IntervalKind::Kind::Microsecond)
|
else if (interval_type->getKind() == IntervalKind::Kind::Microsecond)
|
||||||
|
Loading…
Reference in New Issue
Block a user