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

MCOL-4263 return int for func_floor on datetime

For TIMESTAMP, it should do similar. However, it didn't work. For some reason, MDB has the function set as DATETIME, which for cs, isn't the same thing. Added a kludge to ha_mcs_execplan.cpp to handle it.
This commit is contained in:
David Hall
2020-12-04 16:43:32 -06:00
parent cc6c51b540
commit d35002fb65
2 changed files with 10 additions and 15 deletions

View File

@ -4149,6 +4149,14 @@ ReturnedColumn* buildFunctionColumn(
#endif
fc->operationType(functor->operationType(funcParms, fc->resultType()));
// For some reason, MDB has MYSQL_TYPE_DATETIME2 for functions on a TIMESTAMP
if (fc->operationType().colDataType == CalpontSystemCatalog::TIMESTAMP)
{
CalpontSystemCatalog::ColType ct = fc->resultType();
ct.colDataType = CalpontSystemCatalog::TIMESTAMP;
ct.colWidth = 8;
fc->resultType(ct);
}
fc->expressionId(ci->expressionId++);
// A few functions use a different collation than that found in
// the base ifp class