diff --git a/src/Interpreters/RowRefs.cpp b/src/Interpreters/RowRefs.cpp index 7617f589eb7..03abae01453 100644 --- a/src/Interpreters/RowRefs.cpp +++ b/src/Interpreters/RowRefs.cpp @@ -39,6 +39,7 @@ void callWithType(TypeIndex which, F && f) case TypeIndex::Decimal32: return f(Decimal32()); case TypeIndex::Decimal64: return f(Decimal64()); case TypeIndex::Decimal128: return f(Decimal128()); + case TypeIndex::DateTime64: return f(DateTime64()); default: break; } @@ -153,6 +154,9 @@ std::optional AsofRowRefs::getTypeSize(const IColumn & asof_column, s case TypeIndex::Decimal128: size = sizeof(Decimal128); return idx; + case TypeIndex::DateTime64: + size = sizeof(DateTime64); + return idx; default: break; } diff --git a/src/Interpreters/RowRefs.h b/src/Interpreters/RowRefs.h index fc035bf626e..8e5141be199 100644 --- a/src/Interpreters/RowRefs.h +++ b/src/Interpreters/RowRefs.h @@ -228,7 +228,8 @@ public: Entry::LookupPtr, Entry::LookupPtr, Entry::LookupPtr, - Entry::LookupPtr>; + Entry::LookupPtr, + Entry::LookupPtr>; AsofRowRefs() {} AsofRowRefs(TypeIndex t); diff --git a/tests/queries/0_stateless/01553_datetime64_comparison.reference b/tests/queries/0_stateless/01553_datetime64_comparison.reference index 380b93798ce..07f0dd10d60 100644 --- a/tests/queries/0_stateless/01553_datetime64_comparison.reference +++ b/tests/queries/0_stateless/01553_datetime64_comparison.reference @@ -1,3 +1,3 @@ -2019-09-16 19:20:33.123000 2019-09-16 19:20:33.123 0 1 1 1 0 -2015-05-18 07:40:29.123456 2019-09-16 19:20:33.123 0 0 0 1 1 -2019-09-16 19:20:33.123456 2015-05-18 07:40:29.123 1 1 0 0 0 +2015-05-18 07:40:29.123456 2019-09-16 19:20:33.123 0 0 0 1 1 1 +2019-09-16 19:20:33.123000 2019-09-16 19:20:33.123 0 1 1 1 0 0 +2019-09-16 19:20:33.123456 2015-05-18 07:40:29.123 1 1 0 0 0 1 diff --git a/tests/queries/0_stateless/01553_datetime64_comparison.sql b/tests/queries/0_stateless/01553_datetime64_comparison.sql index 981952d43b4..bc7f9a57032 100644 --- a/tests/queries/0_stateless/01553_datetime64_comparison.sql +++ b/tests/queries/0_stateless/01553_datetime64_comparison.sql @@ -14,7 +14,8 @@ SELECT dt6 >= dt3, dt6 = dt3, dt6 <= dt3, - dt6 < dt3 + dt6 < dt3, + dt6 != dt3 FROM datetime64_cmp ORDER BY dt6, dt3;