You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-2230 Fix TIMEDIFF() handling
TIMEDIFF would not compare datetime with string correctly, causing a NULL saturation.
This commit is contained in:
@ -118,7 +118,10 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
|
|||||||
|
|
||||||
case execplan::CalpontSystemCatalog::TIME:
|
case execplan::CalpontSystemCatalog::TIME:
|
||||||
case execplan::CalpontSystemCatalog::DATETIME:
|
case execplan::CalpontSystemCatalog::DATETIME:
|
||||||
if (type1 != type2)
|
// Diff between time and datetime returns NULL in MariaDB
|
||||||
|
if ((type2 == execplan::CalpontSystemCatalog::TIME ||
|
||||||
|
type2 == execplan::CalpontSystemCatalog::DATETIME) &&
|
||||||
|
type1 != type2)
|
||||||
{
|
{
|
||||||
isNull = true;
|
isNull = true;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user