1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

MCOL-1433 Fix several functions for TIME handling

This fixes hex() so that it outputs the hex of the ASCII for the time
data to make it aligned with MariaDB. It also fixes the following
functions so that they use NOW() as a DATETIME with the input TIME added
to it:

* weekday()
* yearweek()
* monthname()
* last_day()
* year()
* weekofyear()
* week()
* to_days()
* quarter()
* month()
* dayofyear()
* dayofweek()
* dayofmonth()
* day()
* date()
This commit is contained in:
Andrew Hutchings
2018-06-08 14:58:08 +01:00
parent 12b1d99f51
commit d9e6ba90ad
18 changed files with 380 additions and 174 deletions

View File

@@ -78,6 +78,7 @@ string Func_hex::getStrVal(rowgroup::Row& row,
case CalpontSystemCatalog::VARCHAR:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::TIME:
{
const string& arg = parm[0]->data()->getStrVal(row, isNull);
scoped_array<char> hexPtr(new char[strlen(arg.c_str()) * 2 + 1]);