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

Merge pull request #492 from mariadb-corporation/MCOL-392-fixes

Fix a bunch of issues around TIME data type
This commit is contained in:
David.Hall
2018-06-07 09:18:56 -05:00
committed by GitHub
7 changed files with 57 additions and 57 deletions

View File

@ -223,7 +223,14 @@ int64_t Func_add_time::getIntVal(rowgroup::Row& row,
bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
{
return getDatetimeIntVal(row, parm, isNull, op_ct);
if (parm[0]->data()->resultType().colDataType == execplan::CalpontSystemCatalog::TIME)
{
return getTimeIntVal(row, parm, isNull, op_ct);
}
else
{
return getDatetimeIntVal(row, parm, isNull, op_ct);
}
}
string Func_add_time::getStrVal(rowgroup::Row& row,

View File

@ -145,7 +145,9 @@ string Func_dayname::getStrVal(rowgroup::Row& row,
bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
{
uint32_t weekday = getIntVal(row, parm, isNull, op_ct);
int32_t weekday = getIntVal(row, parm, isNull, op_ct);
if (weekday == -1)
return "";
return helpers::weekdayFullNames[weekday];
}

View File

@ -47,7 +47,9 @@ string Func_monthname::getStrVal(rowgroup::Row& row,
bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
{
uint32_t month = getIntVal(row, parm, isNull, op_ct);
int32_t month = getIntVal(row, parm, isNull, op_ct);
if (month == -1)
return "";
return helpers::monthFullNames[month];
}