1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-392 Add initial TIME datatype support

This commit is contained in:
Andrew Hutchings
2018-04-23 19:20:31 +01:00
parent b584a7f555
commit 3c1ebd8b94
109 changed files with 2241 additions and 47 deletions

View File

@ -281,6 +281,7 @@ void CompareRule::compileRules(const std::vector<IdbSortSpec>& spec, const rowgr
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIME:
{
Compare* c = new UintCompare(*i);
fCompares.push_back(c);
@ -413,6 +414,7 @@ bool EqualCompData::operator()(Row::Pointer a, Row::Pointer b)
case CalpontSystemCatalog::UBIGINT:
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIME:
{
// equal compare. ignore sign and null
eq = (fRow1.getUintField(*i) == fRow2.getUintField(*i));

View File

@ -77,6 +77,7 @@ boost::shared_ptr<WindowFunctionType> WF_lead_lag<T>::makeFunction(int id, const
case CalpontSystemCatalog::UDECIMAL:
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIME:
{
func.reset(new WF_lead_lag<uint64_t>(id, name));
break;

View File

@ -76,6 +76,7 @@ boost::shared_ptr<WindowFunctionType> WF_min_max<T>::makeFunction(int id, const
case CalpontSystemCatalog::UDECIMAL:
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIME:
{
func.reset(new WF_min_max<uint64_t>(id, name));
break;

View File

@ -77,6 +77,7 @@ boost::shared_ptr<WindowFunctionType> WF_nth_value<T>::makeFunction(int id, cons
case CalpontSystemCatalog::UDECIMAL:
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIME:
{
func.reset(new WF_nth_value<uint64_t>(id, name));
break;

View File

@ -82,6 +82,7 @@ boost::shared_ptr<WindowFunctionType> WF_percentile<T>::makeFunction(int id, con
case CalpontSystemCatalog::UDECIMAL:
case CalpontSystemCatalog::DATE:
case CalpontSystemCatalog::DATETIME:
case CalpontSystemCatalog::TIME:
{
func.reset(new WF_percentile<uint64_t>(id, name));
break;

View File

@ -392,6 +392,7 @@ void WF_udaf<T>::SetUDAFValue(static_any::any& valOut, int64_t colOut,
case execplan::CalpontSystemCatalog::UBIGINT:
case execplan::CalpontSystemCatalog::DATE:
case execplan::CalpontSystemCatalog::DATETIME:
case execplan::CalpontSystemCatalog::TIME:
setValue(colDataType, b, e, c, &uintOut);
break;

View File

@ -91,6 +91,7 @@ map<int, string> colType2String = assign::map_list_of
(CalpontSystemCatalog::LONGDOUBLE, "INTERNAL LONG DOUBLE")
(CalpontSystemCatalog::STRINT, "INTERNAL SHORT STRING")
(CalpontSystemCatalog::TEXT, "TEXT")
(CalpontSystemCatalog::TIME, "TIME")
;
@ -490,6 +491,7 @@ void* WindowFunctionType::getNullValueByType(int ct, int pos)
static uint64_t doubleNull = joblist::DOUBLENULL;
static uint64_t dateNull = joblist::DATENULL;
static uint64_t datetimeNull = joblist::DATETIMENULL;
static uint64_t timeNull = joblist::TIMENULL;
static uint64_t char1Null = joblist::CHAR1NULL;
static uint64_t char2Null = joblist::CHAR2NULL;
static uint64_t char4Null = joblist::CHAR4NULL;
@ -525,6 +527,10 @@ void* WindowFunctionType::getNullValueByType(int ct, int pos)
v = &datetimeNull;
break;
case CalpontSystemCatalog::TIME:
v = &timeNull;
break;
case CalpontSystemCatalog::FLOAT:
case CalpontSystemCatalog::UFLOAT:
v = &floatNull;