You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-1433 Fix TIME for MAKEDATE/TIMEDIFF
Fix saturation behaviour for TIME with MAKEDATE() and TIMEDIFF()
This commit is contained in:
@@ -149,9 +149,10 @@ uint64_t makedate(rowgroup::Row& row,
|
|||||||
case CalpontSystemCatalog::TIME:
|
case CalpontSystemCatalog::TIME:
|
||||||
{
|
{
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
Time aTime = parm[1]->data()->getTimeIntVal(row, isNull);
|
char buf[9];
|
||||||
ss << aTime.hour << aTime.minute << aTime.second;
|
uint64_t aTime = parm[1]->data()->getTimeIntVal(row, isNull);
|
||||||
dayofyear = ss.str();
|
DataConvert::timeToString1(aTime, buf, 9);
|
||||||
|
dayofyear = buf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -118,6 +118,11 @@ 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)
|
||||||
|
{
|
||||||
|
isNull = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
val1 = parm[0]->data()->getDatetimeIntVal(row, isNull);
|
val1 = parm[0]->data()->getDatetimeIntVal(row, isNull);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user