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-265 Add support for TIMESTAMP data type
This commit is contained in:
@ -318,6 +318,7 @@ void CompareRule::compileRules(const std::vector<IdbSortSpec>& spec, const rowgr
|
||||
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
Compare* c = new UintCompare(*i);
|
||||
@ -451,6 +452,7 @@ bool EqualCompData::operator()(Row::Pointer a, Row::Pointer b)
|
||||
case CalpontSystemCatalog::UBIGINT:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
// equal compare. ignore sign and null
|
||||
|
@ -78,6 +78,7 @@ boost::shared_ptr<WindowFunctionType> WF_lead_lag<T>::makeFunction(int id, const
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
func.reset(new WF_lead_lag<uint64_t>(id, name));
|
||||
|
@ -77,6 +77,7 @@ boost::shared_ptr<WindowFunctionType> WF_min_max<T>::makeFunction(int id, const
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
func.reset(new WF_min_max<uint64_t>(id, name));
|
||||
|
@ -78,6 +78,7 @@ boost::shared_ptr<WindowFunctionType> WF_nth_value<T>::makeFunction(int id, cons
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
func.reset(new WF_nth_value<uint64_t>(id, name));
|
||||
|
@ -83,6 +83,7 @@ boost::shared_ptr<WindowFunctionType> WF_percentile<T>::makeFunction(int id, con
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
func.reset(new WF_percentile<uint64_t>(id, name));
|
||||
|
@ -271,6 +271,7 @@ bool WF_udaf::dropValues(int64_t b, int64_t e)
|
||||
case CalpontSystemCatalog::TIME:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
{
|
||||
uint64_t valIn;
|
||||
|
||||
@ -687,6 +688,7 @@ void WF_udaf::SetUDAFValue(static_any::any& valOut, int64_t colOut,
|
||||
case execplan::CalpontSystemCatalog::UBIGINT:
|
||||
case execplan::CalpontSystemCatalog::DATE:
|
||||
case execplan::CalpontSystemCatalog::DATETIME:
|
||||
case execplan::CalpontSystemCatalog::TIMESTAMP:
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
if (valOut.empty())
|
||||
{
|
||||
@ -931,6 +933,7 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c)
|
||||
case CalpontSystemCatalog::TIME:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
{
|
||||
uint64_t valIn;
|
||||
|
||||
|
@ -91,6 +91,7 @@ map<int, string> colType2String = assign::map_list_of
|
||||
(CalpontSystemCatalog::STRINT, "INTERNAL SHORT STRING")
|
||||
(CalpontSystemCatalog::TEXT, "TEXT")
|
||||
(CalpontSystemCatalog::TIME, "TIME")
|
||||
(CalpontSystemCatalog::TIMESTAMP, "TIMESTAMP")
|
||||
;
|
||||
|
||||
|
||||
@ -602,6 +603,7 @@ void* WindowFunctionType::getNullValueByType(int ct, int pos)
|
||||
static uint64_t dateNull = joblist::DATENULL;
|
||||
static uint64_t datetimeNull = joblist::DATETIMENULL;
|
||||
static uint64_t timeNull = joblist::TIMENULL;
|
||||
static uint64_t timestampNull = joblist::TIMESTAMPNULL;
|
||||
// static uint64_t char1Null = joblist::CHAR1NULL;
|
||||
// static uint64_t char2Null = joblist::CHAR2NULL;
|
||||
// static uint64_t char4Null = joblist::CHAR4NULL;
|
||||
@ -637,6 +639,10 @@ void* WindowFunctionType::getNullValueByType(int ct, int pos)
|
||||
v = &datetimeNull;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::TIMESTAMP:
|
||||
v = ×tampNull;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::TIME:
|
||||
v = &timeNull;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user