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;