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-4236 Change ceil(datetime) to return datetime type
This commit is contained in:
@ -143,37 +143,25 @@ int64_t Func_ceil::getIntVal(Row& row,
|
||||
|
||||
case CalpontSystemCatalog::DATE:
|
||||
{
|
||||
Date d (parm[0]->data()->getDateIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = d.convertToMySQLint();
|
||||
ret = parm[0]->data()->getDateIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
{
|
||||
DateTime dt(parm[0]->data()->getDatetimeIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = dt.convertToMySQLint();
|
||||
ret = parm[0]->data()->getDatetimeIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
{
|
||||
TimeStamp dt(parm[0]->data()->getTimestampIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = dt.convertToMySQLint(timeZone());
|
||||
ret = parm[0]->data()->getTimestampIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
Time dt(parm[0]->data()->getTimeIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = dt.convertToMySQLint();
|
||||
ret = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -248,8 +236,10 @@ uint64_t Func_ceil::getUintVal(Row& row,
|
||||
|
||||
case CalpontSystemCatalog::DATE:
|
||||
{
|
||||
// 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)
|
||||
ret = d.convertToMySQLint();
|
||||
}
|
||||
@ -257,28 +247,19 @@ uint64_t Func_ceil::getUintVal(Row& row,
|
||||
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
{
|
||||
DateTime dt(parm[0]->data()->getDatetimeIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = dt.convertToMySQLint();
|
||||
ret = parm[0]->data()->getDatetimeIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
{
|
||||
TimeStamp dt(parm[0]->data()->getTimestampIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = dt.convertToMySQLint(timeZone());
|
||||
ret = parm[0]->data()->getTimestampIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
Time dt(parm[0]->data()->getTimeIntVal(row, isNull));
|
||||
|
||||
if (!isNull)
|
||||
ret = dt.convertToMySQLint();
|
||||
ret = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user