1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1433 Fix TIME for MAKEDATE/TIMEDIFF

Fix saturation behaviour for TIME with MAKEDATE() and TIMEDIFF()
This commit is contained in:
Andrew Hutchings
2018-10-04 16:53:14 +01:00
parent c0600d0da0
commit a127f84793
2 changed files with 9 additions and 3 deletions

View File

@ -149,9 +149,10 @@ uint64_t makedate(rowgroup::Row& row,
case CalpontSystemCatalog::TIME:
{
std::ostringstream ss;
Time aTime = parm[1]->data()->getTimeIntVal(row, isNull);
ss << aTime.hour << aTime.minute << aTime.second;
dayofyear = ss.str();
char buf[9];
uint64_t aTime = parm[1]->data()->getTimeIntVal(row, isNull);
DataConvert::timeToString1(aTime, buf, 9);
dayofyear = buf;
break;
}