From 46e2701fedde407aa5c97847663c1197b4386326 Mon Sep 17 00:00:00 2001 From: Jose Rojas Date: Thu, 17 Oct 2019 21:19:10 +0000 Subject: [PATCH] MCOL-3474 TIMEDIFF() returns incorrect result fix --- utils/funcexp/func_timediff.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/funcexp/func_timediff.cpp b/utils/funcexp/func_timediff.cpp index 0e16e3a4f..92a69a2d2 100644 --- a/utils/funcexp/func_timediff.cpp +++ b/utils/funcexp/func_timediff.cpp @@ -119,9 +119,7 @@ string Func_timediff::getStrVal(rowgroup::Row& row, case execplan::CalpontSystemCatalog::TIME: case execplan::CalpontSystemCatalog::DATETIME: // Diff between time and datetime returns NULL in MariaDB - if ((type2 == execplan::CalpontSystemCatalog::TIME || - type2 == execplan::CalpontSystemCatalog::DATETIME) && - type1 != type2) + if (type1 != type2) { isNull = true; break;