1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

TIMESTAMP namespace fixes

Namespace issues in the TIMESTAMP code caused compiling to break. This
patch fixes that.
This commit is contained in:
Andrew Hutchings
2019-06-12 15:05:20 +01:00
parent d6cdef3d86
commit 1db56546ee
22 changed files with 69 additions and 69 deletions

View File

@ -64,10 +64,10 @@ int64_t Func_day::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
return m_time.day;
}

View File

@ -76,10 +76,10 @@ int64_t Func_dayname::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
val = parm[0]->data()->getIntVal(row, isNull);
TimeStamp timestamp(val);
dataconvert::TimeStamp timestamp(val);
int64_t seconds = timestamp.second;
MySQLTime time;
gmtSecToMySQLTime(seconds, time, fTimeZone);
dataconvert::MySQLTime time;
dataconvert::gmtSecToMySQLTime(seconds, time, fTimeZone);
year = time.year;
month = time.month;
day = time.day;

View File

@ -74,10 +74,10 @@ int64_t Func_dayofweek::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
val = parm[0]->data()->getIntVal(row, isNull);
TimeStamp timestamp(val);
dataconvert::TimeStamp timestamp(val);
int64_t seconds = timestamp.second;
MySQLTime time;
gmtSecToMySQLTime(seconds, time, fTimeZone);
dataconvert::MySQLTime time;
dataconvert::gmtSecToMySQLTime(seconds, time, fTimeZone);
year = time.year;
month = time.month;
day = time.day;

View File

@ -73,10 +73,10 @@ int64_t Func_dayofyear::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
year = m_time.year;
month = m_time.month;
day = m_time.day;

View File

@ -249,11 +249,11 @@ int64_t Func_extract::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
DateTime dt;
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::DateTime dt;
dt.year = m_time.year;
dt.month = m_time.month;
dt.day = m_time.day;

View File

@ -111,10 +111,10 @@ int64_t Func_hour::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
return m_time.hour;
}

View File

@ -111,10 +111,10 @@ int64_t Func_minute::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
return m_time.minute;
}

View File

@ -63,10 +63,10 @@ int64_t Func_month::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
return m_time.month;
}

View File

@ -104,10 +104,10 @@ int64_t Func_monthname::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
val = parm[0]->data()->getIntVal(row, isNull);
TimeStamp timestamp(val);
dataconvert::TimeStamp timestamp(val);
int64_t seconds = timestamp.second;
MySQLTime time;
gmtSecToMySQLTime(seconds, time, fTimeZone);
dataconvert::MySQLTime time;
dataconvert::gmtSecToMySQLTime(seconds, time, fTimeZone);
return time.month;
}

View File

@ -67,10 +67,10 @@ int64_t Func_quarter::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
month = m_time.month;
break;
}

View File

@ -110,10 +110,10 @@ int64_t Func_second::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
return m_time.second;
}

View File

@ -120,11 +120,11 @@ string Func_time::getStrVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
Time time;
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::Time time;
time.hour = m_time.hour;
time.minute = m_time.minute;
time.second = m_time.second;

View File

@ -74,10 +74,10 @@ string Func_time_format::getStrVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
hour = m_time.hour;
min = m_time.minute;
sec = m_time.second;

View File

@ -73,10 +73,10 @@ int64_t Func_time_to_sec::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
val = parm[0]->data()->getIntVal(row, isNull);
TimeStamp timestamp(val);
dataconvert::TimeStamp timestamp(val);
int64_t seconds = timestamp.second;
MySQLTime time;
gmtSecToMySQLTime(seconds, time, fTimeZone);
dataconvert::MySQLTime time;
dataconvert::gmtSecToMySQLTime(seconds, time, fTimeZone);
hour = time.hour;
min = time.minute;
sec = time.second;

View File

@ -134,11 +134,11 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
break;
}
int64_t temp = parm[0]->data()->getTimestampIntVal(row, isNull);
TimeStamp timestamp(temp);
dataconvert::TimeStamp timestamp(temp);
int64_t seconds = timestamp.second;
MySQLTime time;
gmtSecToMySQLTime(seconds, time, fTimeZone);
DateTime dt;
dataconvert::MySQLTime time;
dataconvert::gmtSecToMySQLTime(seconds, time, fTimeZone);
dataconvert::DateTime dt;
dt.year = time.year;
dt.month = time.month;
dt.day = time.day;
@ -196,11 +196,11 @@ string Func_timediff::getStrVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
int64_t temp = parm[1]->data()->getTimestampIntVal(row, isNull);
TimeStamp timestamp(temp);
dataconvert::TimeStamp timestamp(temp);
int64_t seconds = timestamp.second;
MySQLTime time;
gmtSecToMySQLTime(seconds, time, fTimeZone);
DateTime dt;
dataconvert::MySQLTime time;
dataconvert::gmtSecToMySQLTime(seconds, time, fTimeZone);
dataconvert::DateTime dt;
dt.year = time.year;
dt.month = time.month;
dt.day = time.day;

View File

@ -87,10 +87,10 @@ int64_t Func_to_days::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
year = m_time.year;
month = m_time.month;
day = m_time.day;

View File

@ -77,10 +77,10 @@ int64_t Func_week::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
year = m_time.year;
month = m_time.month;
day = m_time.day;

View File

@ -73,10 +73,10 @@ int64_t Func_weekday::getIntVal(rowgroup::Row& row,
case CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getTimestampIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
year = m_time.year;
month = m_time.month;
day = m_time.day;

View File

@ -63,10 +63,10 @@ int64_t Func_year::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
return m_time.year;
}

View File

@ -80,10 +80,10 @@ int64_t Func_yearweek::getIntVal(rowgroup::Row& row,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
dataconvert::TimeStamp timestamp(parm[0]->data()->getIntVal(row, isNull));
int64_t seconds = timestamp.second;
MySQLTime m_time;
gmtSecToMySQLTime(seconds, m_time, fTimeZone);
dataconvert::MySQLTime m_time;
dataconvert::gmtSecToMySQLTime(seconds, m_time, fTimeZone);
year = m_time.year;
month = m_time.month;
day = m_time.day;

View File

@ -991,7 +991,7 @@ void TableInfo::reportTotals(double elapsedTime)
"invalid date/times replaced with zero value : ";
}
else if (fColumns[i].column.dataType == CalpontSystemCatalog::TIMESTAMP)
else if (fColumns[i].column.dataType == execplan::CalpontSystemCatalog::TIMESTAMP)
{
ossSatCnt <<
"invalid timestamps replaced with zero value : ";

View File

@ -448,7 +448,7 @@ inline int convertDataType(int dataType)
break;
case ddlpackage::DDL_TIMESTAMP:
calpontDataType = CalpontSystemCatalog::TIMESTAMP;
calpontDataType = execplan::CalpontSystemCatalog::TIMESTAMP;
break;
case ddlpackage::DDL_CLOB: