You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-1433 Fix some functions for TIME
Fixes the following: * CAST() (as DATE/DATETIME) * DATE() * DATE_FORMAT() * MAKEDATE() * NULLIF() * TIMEDIFF() * TO_DAYS() / DATEDIFF()
This commit is contained in:
@ -146,11 +146,26 @@ uint64_t makedate(rowgroup::Row& row,
|
||||
break;
|
||||
}
|
||||
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
std::ostringstream ss;
|
||||
Time aTime = parm[1]->data()->getTimeIntVal(row, isNull);
|
||||
ss << aTime.hour << aTime.minute << aTime.second;
|
||||
dayofyear = ss.str();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
isNull = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (atoi(dayofyear.c_str()) == 0)
|
||||
{
|
||||
isNull = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// convert the year to a date in our internal format, then subtract
|
||||
// one since we are about to add the day of year back in
|
||||
Date d(year, 1, 1);
|
||||
|
Reference in New Issue
Block a user