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-330 Fix datetime to int conversion
Datetime has internal int value which is very different to MySQL's int value. This patch differentiates between the two and also fixes a column width issue which appeared once the datetime handling was fixed.
This commit is contained in:
@ -227,7 +227,7 @@ string Func_date_format::getStrVal(rowgroup::Row& row,
|
||||
dt.day = (uint32_t)((val >> 6) & 0x3f);
|
||||
break;
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
val = parm[0]->data()->getIntVal(row, isNull);
|
||||
val = parm[0]->data()->getDatetimeIntVal(row, isNull);
|
||||
dt.year = (uint32_t)((val >> 48) & 0xffff);
|
||||
dt.month = (uint32_t)((val >> 44) & 0xf);
|
||||
dt.day = (uint32_t)((val >> 38) & 0x3f);
|
||||
|
Reference in New Issue
Block a user