1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

MCOL-347 Fix NULLIF() for DATETIME with DATE

Comparing DATETIME with DATE compared two different date int formats
This commit is contained in:
Andrew Hutchings
2016-10-04 17:23:10 +01:00
parent 6d8a177bd1
commit 0d292e2b78

View File

@@ -362,7 +362,8 @@ int64_t Func_nullif::getDatetimeIntVal(rowgroup::Row& row,
} }
case execplan::CalpontSystemCatalog::DATE: case execplan::CalpontSystemCatalog::DATE:
{ {
exp2 = parm[1]->data()->getDateIntVal(row, isNull); // Upgrade to datetime for proper comparison
exp2 = parm[1]->data()->getDatetimeIntVal(row, isNull);
if (isNull) { if (isNull) {
isNull = false; isNull = false;
return exp1; return exp1;