You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4472 Fix up floor() for the new format MariaDB 10.5
In 105, MariaDB expects a new format from floor()
This commit is contained in:
@ -105,10 +105,12 @@ int64_t Func_floor::getIntVal(Row& row,
|
|||||||
|
|
||||||
case execplan::CalpontSystemCatalog::DATE:
|
case execplan::CalpontSystemCatalog::DATE:
|
||||||
{
|
{
|
||||||
string str = DataConvert::dateToString1(parm[0]->data()->getDateIntVal(row, isNull));
|
// For some reason, MDB doesn't return this as a date,
|
||||||
|
// but datetime is returned as a datetime. Expect
|
||||||
|
// this to change in the future.
|
||||||
|
Date d (parm[0]->data()->getDateIntVal(row, isNull));
|
||||||
if (!isNull)
|
if (!isNull)
|
||||||
ret = atoll(str.c_str());
|
ret = d.convertToMySQLint();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -127,14 +129,7 @@ int64_t Func_floor::getIntVal(Row& row,
|
|||||||
|
|
||||||
case execplan::CalpontSystemCatalog::TIME:
|
case execplan::CalpontSystemCatalog::TIME:
|
||||||
{
|
{
|
||||||
string str =
|
ret = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||||
DataConvert::timeToString1(parm[0]->data()->getTimeIntVal(row, isNull));
|
|
||||||
|
|
||||||
// strip off micro seconds
|
|
||||||
str = str.substr(0, 14);
|
|
||||||
|
|
||||||
if (!isNull)
|
|
||||||
ret = atoll(str.c_str());
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user