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

MCOL-392 Function fixes

Fixes most of the functions in funcexp so that time and datetime's
microseconds are handled correctly
This commit is contained in:
Andrew Hutchings
2018-04-27 21:18:14 +01:00
parent bd50bbb8bb
commit 957dc44615
11 changed files with 271 additions and 101 deletions

View File

@ -211,13 +211,14 @@ int64_t Func_greatest::getTimeIntVal(rowgroup::Row& row,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
{
int64_t str = fp[0]->data()->getTimeIntVal(row, isNull);
// Strip off unused day
int64_t str = fp[0]->data()->getTimeIntVal(row, isNull) << 12;
int64_t greatestStr = str;
for (uint32_t i = 1; i < fp.size(); i++)
{
int64_t str1 = fp[i]->data()->getTimeIntVal(row, isNull);
int64_t str1 = fp[i]->data()->getTimeIntVal(row, isNull) << 12;
if ( greatestStr < str1 )
greatestStr = str1;