trying to fix tests

This commit is contained in:
yariks5s 2024-06-06 16:15:35 +00:00
parent 26503e1c53
commit 63b0d13a62
3 changed files with 14 additions and 16 deletions

View File

@ -192,8 +192,6 @@ public:
case ResultType::DateTime64:
{
UInt32 scale = 0;
if (isDateTime64(arguments[0].type))
scale = assert_cast<const DataTypeDateTime64 &>(*arguments[0].type.get()).getScale();
if (interval_type->getKind() == IntervalKind::Kind::Nanosecond)
scale = (9 > scale) ? 9 : scale;
else if (interval_type->getKind() == IntervalKind::Kind::Microsecond)

View File

@ -10,25 +10,25 @@ test intervals
- test microseconds
1980-12-12 12:12:12.123456
1980-12-12 12:12:12.123400
1980-12-12 12:12:12.12345700
1980-12-12 12:12:12.12345700
1980-12-12 12:12:12.123457
1980-12-12 12:12:12.123457
1930-12-12 12:12:12.123456
1930-12-12 12:12:12.123400
1930-12-12 12:12:12.12345600
1930-12-12 12:12:12.123456
2220-12-12 12:12:12.123456
2220-12-12 12:12:12.123400
2220-12-12 12:12:12.12345700
2220-12-12 12:12:12.123457
- test milliseconds
1980-12-12 12:12:12.123
1980-12-12 12:12:12.120
1980-12-12 12:12:12.123000
1980-12-12 12:12:12.123000
1980-12-12 12:12:12.123
1980-12-12 12:12:12.123
1930-12-12 12:12:12.123
1930-12-12 12:12:12.120
1930-12-12 12:12:12.123000
1930-12-12 12:12:12.123
2220-12-12 12:12:12.123
2220-12-12 12:12:12.120
2220-12-12 12:12:12.123000
2220-12-12 12:12:12.123
test add[...]seconds()
- test nanoseconds
1980-12-12 12:12:12.123456790

View File

@ -1,7 +1,7 @@
2023-10-09 10:11:12.001000
2023-10-09 10:11:12.001000
2023-10-09 10:11:12.000000
2023-10-09 10:11:12.000000
2023-10-09 00:00:00.000000000
2023-10-09 00:00:00.000000000
2023-10-09 10:11:12.001
2023-10-09 10:11:12.001
2023-10-09 10:11:12.000
2023-10-09 10:11:12.000
2023-10-09 00:00:00.000000
2023-10-09 00:00:00.000
2023-10-09 00:00:00