You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
Fully resolve potentially ambiguous symbols by removing using namespace statements from headers which have a cascading effect. This causes potential behavior changes when switching to c++11 since symbols can be exported from std and boost while both have been imported into the global namespace.
This commit is contained in:
@@ -56,8 +56,8 @@ int64_t Func_date::getIntVal(rowgroup::Row& row,
|
||||
|
||||
string value = "";
|
||||
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ int64_t Func_date::getIntVal(rowgroup::Row& row,
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
int64_t val;
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
aDateTime.hour = 0;
|
||||
|
@@ -49,8 +49,8 @@ int64_t Func_day::getIntVal(rowgroup::Row& row,
|
||||
{
|
||||
int64_t val = 0;
|
||||
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ int64_t Func_day::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -54,8 +54,8 @@ int64_t Func_dayname::getIntVal(rowgroup::Row& row,
|
||||
int64_t val = 0;
|
||||
int32_t dayofweek = 0;
|
||||
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ int64_t Func_dayname::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -52,8 +52,8 @@ int64_t Func_dayofweek::getIntVal(rowgroup::Row& row,
|
||||
uint32_t day = 0;
|
||||
int64_t val = 0;
|
||||
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ int64_t Func_dayofweek::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -52,8 +52,8 @@ int64_t Func_dayofyear::getIntVal(rowgroup::Row& row,
|
||||
uint32_t day = 0;
|
||||
int64_t val = 0;
|
||||
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ int64_t Func_dayofyear::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -48,8 +48,8 @@ int64_t Func_month::getIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& op_ct)
|
||||
{
|
||||
int64_t val = 0;
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ int64_t Func_month::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -79,8 +79,8 @@ int64_t Func_monthname::getIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& op_ct)
|
||||
{
|
||||
int64_t val = 0;
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ int64_t Func_monthname::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -50,8 +50,8 @@ int64_t Func_quarter::getIntVal(rowgroup::Row& row,
|
||||
{
|
||||
// try to cast to date/datetime
|
||||
int64_t val = 0, month = 0;
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ int64_t Func_quarter::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -59,8 +59,8 @@ int64_t Func_to_days::getIntVal(rowgroup::Row& row,
|
||||
month = 0,
|
||||
day = 0;
|
||||
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ int64_t Func_to_days::getIntVal(rowgroup::Row& row,
|
||||
case CalpontSystemCatalog::TIME:
|
||||
{
|
||||
int64_t val;
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aDateTime.hour = 0;
|
||||
aDateTime.minute = 0;
|
||||
|
@@ -53,8 +53,8 @@ int64_t Func_week::getIntVal(rowgroup::Row& row,
|
||||
|
||||
int64_t val = 0;
|
||||
int16_t mode = 0;
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
if (parm.size() > 1) // mode value
|
||||
mode = parm[1]->data()->getIntVal(row, isNull);
|
||||
@@ -77,7 +77,7 @@ int64_t Func_week::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -52,8 +52,8 @@ int64_t Func_weekday::getIntVal(rowgroup::Row& row,
|
||||
uint32_t month = 0;
|
||||
uint32_t day = 0;
|
||||
int64_t val = 0;
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ int64_t Func_weekday::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -48,8 +48,8 @@ int64_t Func_year::getIntVal(rowgroup::Row& row,
|
||||
CalpontSystemCatalog::ColType& op_ct)
|
||||
{
|
||||
int64_t val = 0;
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
switch (parm[0]->data()->resultType().colDataType)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ int64_t Func_year::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -54,8 +54,8 @@ int64_t Func_yearweek::getIntVal(rowgroup::Row& row,
|
||||
|
||||
int64_t val = 0;
|
||||
int16_t mode = 0; // default to 2
|
||||
DateTime aDateTime;
|
||||
Time aTime;
|
||||
dataconvert::DateTime aDateTime;
|
||||
dataconvert::Time aTime;
|
||||
|
||||
if (parm.size() > 1) // mode value
|
||||
mode = parm[1]->data()->getIntVal(row, isNull);
|
||||
@@ -80,7 +80,7 @@ int64_t Func_yearweek::getIntVal(rowgroup::Row& row,
|
||||
|
||||
// Time adds to now() and then gets value
|
||||
case CalpontSystemCatalog::TIME:
|
||||
aDateTime = static_cast<DateTime>(nowDatetime());
|
||||
aDateTime = static_cast<dataconvert::DateTime>(nowDatetime());
|
||||
aTime = parm[0]->data()->getTimeIntVal(row, isNull);
|
||||
aTime.day = 0;
|
||||
val = addTime(aDateTime, aTime);
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include "calpontsystemcatalog.h"
|
||||
|
||||
#include "dataconvert.h"
|
||||
using namespace dataconvert;
|
||||
|
||||
namespace rowgroup
|
||||
{
|
||||
@@ -178,7 +177,7 @@ protected:
|
||||
virtual std::string longDoubleToString(long double);
|
||||
|
||||
virtual int64_t nowDatetime();
|
||||
virtual int64_t addTime(DateTime& dt1, dataconvert::Time& dt2);
|
||||
virtual int64_t addTime(dataconvert::DateTime& dt1, dataconvert::Time& dt2);
|
||||
virtual int64_t addTime(dataconvert::Time& dt1, dataconvert::Time& dt2);
|
||||
|
||||
std::string fFuncName;
|
||||
|
@@ -25,8 +25,6 @@
|
||||
|
||||
#include "functor.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
|
||||
@@ -141,7 +139,7 @@ protected:
|
||||
exponent = (int)floor(log10( fabsl(floatVal)));
|
||||
base = floatVal * pow(10, -1.0 * exponent);
|
||||
|
||||
if (isnan(exponent) || isnan(base))
|
||||
if (std::isnan(exponent) || std::isnan(base))
|
||||
{
|
||||
snprintf(buf, 20, "%Lf", floatVal);
|
||||
fFloatStr = execplan::removeTrailing0(buf, 20);
|
||||
@@ -325,7 +323,7 @@ public:
|
||||
*/
|
||||
class Func_lpad : public Func_Str
|
||||
{
|
||||
static const string fPad;
|
||||
static const std::string fPad;
|
||||
public:
|
||||
Func_lpad() : Func_Str("lpad") {}
|
||||
virtual ~Func_lpad() {}
|
||||
@@ -343,7 +341,7 @@ public:
|
||||
*/
|
||||
class Func_rpad : public Func_Str
|
||||
{
|
||||
static const string fPad;
|
||||
static const std::string fPad;
|
||||
public:
|
||||
Func_rpad() : Func_Str("rpad") {}
|
||||
virtual ~Func_rpad() {}
|
||||
|
@@ -37,12 +37,9 @@
|
||||
|
||||
#include <clocale>
|
||||
|
||||
#include "alarmmanager.h"
|
||||
using namespace alarmmanager;
|
||||
#include "ALARMManager.h"
|
||||
|
||||
#include "liboamcpp.h"
|
||||
using namespace oam;
|
||||
|
||||
|
||||
/** @file */
|
||||
|
||||
@@ -63,7 +60,7 @@ std::string idb_setlocale()
|
||||
{
|
||||
// get and set locale language
|
||||
std::string systemLang("C");
|
||||
Oam oam;
|
||||
oam::Oam oam;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -81,9 +78,9 @@ std::string idb_setlocale()
|
||||
try
|
||||
{
|
||||
//send alarm
|
||||
ALARMManager alarmMgr;
|
||||
alarmmanager::ALARMManager alarmMgr;
|
||||
std::string alarmItem = "system";
|
||||
alarmMgr.sendAlarmReport(alarmItem.c_str(), oam::INVALID_LOCALE, SET);
|
||||
alarmMgr.sendAlarmReport(alarmItem.c_str(), oam::INVALID_LOCALE, alarmmanager::SET);
|
||||
printf("Failed to set locale : %s, Critical alarm generated\n", systemLang.c_str());
|
||||
}
|
||||
catch (...)
|
||||
@@ -96,9 +93,9 @@ std::string idb_setlocale()
|
||||
try
|
||||
{
|
||||
//send alarm
|
||||
ALARMManager alarmMgr;
|
||||
alarmmanager::ALARMManager alarmMgr;
|
||||
std::string alarmItem = "system";
|
||||
alarmMgr.sendAlarmReport(alarmItem.c_str(), oam::INVALID_LOCALE, CLEAR);
|
||||
alarmMgr.sendAlarmReport(alarmItem.c_str(), oam::INVALID_LOCALE, alarmmanager::CLEAR);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
@@ -66,7 +66,7 @@ mcsv1_UDAF::ReturnCode corr::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(corr_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -64,7 +64,7 @@ mcsv1_UDAF::ReturnCode covar_pop::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(covar_pop_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -64,7 +64,7 @@ mcsv1_UDAF::ReturnCode covar_samp::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(covar_samp_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -65,7 +65,7 @@ mcsv1_UDAF::ReturnCode regr_avgx::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_avgx_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(colTypes[1].scale + 4);
|
||||
context->setPrecision(19);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -65,7 +65,7 @@ mcsv1_UDAF::ReturnCode regr_avgy::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_avgy_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(colTypes[0].scale + 4);
|
||||
context->setPrecision(19);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -54,7 +54,7 @@ mcsv1_UDAF::ReturnCode regr_count::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_count_data));
|
||||
context->setResultType(CalpontSystemCatalog::BIGINT);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::BIGINT);
|
||||
context->setColWidth(8);
|
||||
context->setRunFlag(mcsv1sdk::UDAF_IGNORE_NULLS);
|
||||
return mcsv1_UDAF::SUCCESS;
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -65,7 +65,7 @@ mcsv1_UDAF::ReturnCode regr_intercept::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_intercept_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -66,7 +66,7 @@ mcsv1_UDAF::ReturnCode regr_r2::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_r2_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -64,7 +64,7 @@ mcsv1_UDAF::ReturnCode regr_slope::init(mcsv1Context* context,
|
||||
return mcsv1_UDAF::ERROR;
|
||||
}
|
||||
context->setUserDataSize(sizeof(regr_slope_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -63,7 +63,7 @@ mcsv1_UDAF::ReturnCode regr_sxx::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_sxx_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -64,7 +64,7 @@ mcsv1_UDAF::ReturnCode regr_sxy::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_sxy_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -63,7 +63,7 @@ mcsv1_UDAF::ReturnCode regr_syy::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(regr_syy_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(DECIMAL_NOT_SPECIFIED);
|
||||
context->setPrecision(0);
|
||||
|
@@ -43,7 +43,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -1929,7 +1929,7 @@ void RowAggregation::doUDAF(const Row& rowIn, int64_t colIn, int64_t colOut,
|
||||
// The vector of parameters to be sent to the UDAF
|
||||
mcsv1sdk::ColumnDatum valsIn[paramCount];
|
||||
uint32_t dataFlags[paramCount];
|
||||
ConstantColumn* cc;
|
||||
execplan::ConstantColumn* cc;
|
||||
bool bIsNull = false;
|
||||
execplan::CalpontSystemCatalog::ColDataType colDataType;
|
||||
|
||||
@@ -1945,10 +1945,10 @@ void RowAggregation::doUDAF(const Row& rowIn, int64_t colIn, int64_t colOut,
|
||||
|
||||
if (fFunctionCols[funcColsIdx]->fpConstCol)
|
||||
{
|
||||
cc = dynamic_cast<ConstantColumn*>(fFunctionCols[funcColsIdx]->fpConstCol.get());
|
||||
cc = dynamic_cast<execplan::ConstantColumn*>(fFunctionCols[funcColsIdx]->fpConstCol.get());
|
||||
}
|
||||
|
||||
if ((cc && cc->type() == ConstantColumn::NULLDATA)
|
||||
if ((cc && cc->type() == execplan::ConstantColumn::NULLDATA)
|
||||
|| (!cc && isNull(&fRowGroupIn, rowIn, colIn) == true))
|
||||
{
|
||||
if (fRGContext.getRunFlag(mcsv1sdk::UDAF_IGNORE_NULLS))
|
||||
@@ -3706,7 +3706,7 @@ void RowAggregationUM::doNotNullConstantAggregate(const ConstantAggData& aggData
|
||||
|
||||
// Create a datum item for sending to UDAF
|
||||
mcsv1sdk::ColumnDatum& datum = valsIn[0];
|
||||
datum.dataType = (CalpontSystemCatalog::ColDataType)colDataType;
|
||||
datum.dataType = (execplan::CalpontSystemCatalog::ColDataType)colDataType;
|
||||
|
||||
switch (colDataType)
|
||||
{
|
||||
|
@@ -207,7 +207,7 @@ struct RowAggFunctionCol
|
||||
// The first will be a RowUDAFFunctionCol. Subsequent ones will be RowAggFunctionCol
|
||||
// with fAggFunction == ROWAGG_MULTI_PARM. Order is important.
|
||||
// If this parameter is constant, that value is here.
|
||||
SRCP fpConstCol;
|
||||
execplan::SRCP fpConstCol;
|
||||
};
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ inline void RowAggFunctionCol::deserialize(messageqcpp::ByteStream& bs)
|
||||
|
||||
if (t)
|
||||
{
|
||||
fpConstCol.reset(new ConstantColumn);
|
||||
fpConstCol.reset(new execplan::ConstantColumn);
|
||||
fpConstCol.get()->unserialize(bs);
|
||||
}
|
||||
}
|
||||
|
@@ -59,7 +59,6 @@
|
||||
#include "../winport/winport.h"
|
||||
|
||||
// Workaround for my_global.h #define of isnan(X) causing a std::std namespace
|
||||
using namespace std;
|
||||
|
||||
namespace rowgroup
|
||||
{
|
||||
@@ -1028,7 +1027,7 @@ inline void Row::setFloatField(float val, uint32_t colIndex)
|
||||
//N.B. There is a bug in boost::any or in gcc where, if you store a nan, you will get back a nan,
|
||||
// but not necessarily the same bits that you put in. This only seems to be for float (double seems
|
||||
// to work).
|
||||
if (isnan(val))
|
||||
if (std::isnan(val))
|
||||
setUintField<4>(joblist::FLOATNULL, colIndex);
|
||||
else
|
||||
*((float*) &data[offsets[colIndex]]) = val;
|
||||
|
@@ -282,7 +282,7 @@ void PriorityThreadPool::sendErrorMsg(uint32_t id, uint32_t step, primitiveproce
|
||||
ism.Status = logging::primitiveServerErr;
|
||||
ph.UniqueID = id;
|
||||
ph.StepID = step;
|
||||
ByteStream msg(sizeof(ISMPacketHeader) + sizeof(PrimitiveHeader));
|
||||
messageqcpp::ByteStream msg(sizeof(ISMPacketHeader) + sizeof(PrimitiveHeader));
|
||||
msg.append((uint8_t*) &ism, sizeof(ism));
|
||||
msg.append((uint8_t*) &ph, sizeof(ph));
|
||||
|
||||
|
@@ -39,7 +39,7 @@ mcsv1_UDAF::ReturnCode allnull::init(mcsv1Context* context,
|
||||
return mcsv1_UDAF::ERROR;
|
||||
}
|
||||
|
||||
context->setResultType(CalpontSystemCatalog::TINYINT);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::TINYINT);
|
||||
|
||||
return mcsv1_UDAF::SUCCESS;
|
||||
}
|
||||
|
@@ -57,7 +57,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -49,7 +49,7 @@ mcsv1_UDAF::ReturnCode avg_mode::init(mcsv1Context* context,
|
||||
return mcsv1_UDAF::ERROR;
|
||||
}
|
||||
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(context->getScale() * 2);
|
||||
context->setPrecision(19);
|
||||
|
@@ -65,7 +65,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -54,7 +54,7 @@ mcsv1_UDAF::ReturnCode avgx::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(avgx_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(colTypes[0].scale + 4);
|
||||
context->setPrecision(19);
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -16,6 +16,7 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "distinct_count.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
|
||||
using namespace mcsv1sdk;
|
||||
|
||||
@@ -36,7 +37,7 @@ mcsv1_UDAF::ReturnCode distinct_count::init(mcsv1Context* context,
|
||||
context->setErrorMessage("avgx() with other than 1 arguments");
|
||||
return mcsv1_UDAF::ERROR;
|
||||
}
|
||||
context->setResultType(CalpontSystemCatalog::BIGINT);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::BIGINT);
|
||||
context->setColWidth(8);
|
||||
context->setRunFlag(mcsv1sdk::UDAF_IGNORE_NULLS);
|
||||
context->setRunFlag(mcsv1sdk::UDAF_DISTINCT);
|
||||
|
@@ -52,7 +52,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -75,41 +75,41 @@ int32_t mcsv1Context::getColWidth()
|
||||
// JIT initialization for types that have a defined size.
|
||||
switch (fResultType)
|
||||
{
|
||||
case CalpontSystemCatalog::BIT:
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
case CalpontSystemCatalog::UTINYINT:
|
||||
case CalpontSystemCatalog::CHAR:
|
||||
case execplan::CalpontSystemCatalog::BIT:
|
||||
case execplan::CalpontSystemCatalog::TINYINT:
|
||||
case execplan::CalpontSystemCatalog::UTINYINT:
|
||||
case execplan::CalpontSystemCatalog::CHAR:
|
||||
fColWidth = 1;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::SMALLINT:
|
||||
case CalpontSystemCatalog::USMALLINT:
|
||||
case execplan::CalpontSystemCatalog::SMALLINT:
|
||||
case execplan::CalpontSystemCatalog::USMALLINT:
|
||||
fColWidth = 2;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::MEDINT:
|
||||
case CalpontSystemCatalog::INT:
|
||||
case CalpontSystemCatalog::UMEDINT:
|
||||
case CalpontSystemCatalog::UINT:
|
||||
case CalpontSystemCatalog::FLOAT:
|
||||
case CalpontSystemCatalog::UFLOAT:
|
||||
case CalpontSystemCatalog::DATE:
|
||||
case execplan::CalpontSystemCatalog::MEDINT:
|
||||
case execplan::CalpontSystemCatalog::INT:
|
||||
case execplan::CalpontSystemCatalog::UMEDINT:
|
||||
case execplan::CalpontSystemCatalog::UINT:
|
||||
case execplan::CalpontSystemCatalog::FLOAT:
|
||||
case execplan::CalpontSystemCatalog::UFLOAT:
|
||||
case execplan::CalpontSystemCatalog::DATE:
|
||||
fColWidth = 4;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::BIGINT:
|
||||
case CalpontSystemCatalog::UBIGINT:
|
||||
case CalpontSystemCatalog::DECIMAL:
|
||||
case CalpontSystemCatalog::UDECIMAL:
|
||||
case CalpontSystemCatalog::DOUBLE:
|
||||
case CalpontSystemCatalog::UDOUBLE:
|
||||
case CalpontSystemCatalog::DATETIME:
|
||||
case CalpontSystemCatalog::TIME:
|
||||
case CalpontSystemCatalog::STRINT:
|
||||
case execplan::CalpontSystemCatalog::BIGINT:
|
||||
case execplan::CalpontSystemCatalog::UBIGINT:
|
||||
case execplan::CalpontSystemCatalog::DECIMAL:
|
||||
case execplan::CalpontSystemCatalog::UDECIMAL:
|
||||
case execplan::CalpontSystemCatalog::DOUBLE:
|
||||
case execplan::CalpontSystemCatalog::UDOUBLE:
|
||||
case execplan::CalpontSystemCatalog::DATETIME:
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
case execplan::CalpontSystemCatalog::STRINT:
|
||||
fColWidth = 8;
|
||||
break;
|
||||
|
||||
case CalpontSystemCatalog::LONGDOUBLE:
|
||||
case execplan::CalpontSystemCatalog::LONGDOUBLE:
|
||||
fColWidth = sizeof(long double);
|
||||
break;
|
||||
|
||||
@@ -212,7 +212,7 @@ void mcsv1Context::createUserData()
|
||||
void mcsv1Context::serialize(messageqcpp::ByteStream& b) const
|
||||
{
|
||||
b.needAtLeast(sizeof(mcsv1Context));
|
||||
b << (ObjectReader::id_t) ObjectReader::MCSV1_CONTEXT;
|
||||
b << (execplan::ObjectReader::id_t) execplan::ObjectReader::MCSV1_CONTEXT;
|
||||
b << functionName;
|
||||
b << fRunFlags;
|
||||
// Dont send context flags, These are set for each call
|
||||
@@ -232,21 +232,21 @@ void mcsv1Context::serialize(messageqcpp::ByteStream& b) const
|
||||
|
||||
void mcsv1Context::unserialize(messageqcpp::ByteStream& b)
|
||||
{
|
||||
ObjectReader::checkType(b, ObjectReader::MCSV1_CONTEXT);
|
||||
execplan::ObjectReader::checkType(b, execplan::ObjectReader::MCSV1_CONTEXT);
|
||||
b >> functionName;
|
||||
b >> fRunFlags;
|
||||
b >> fUserDataSize;
|
||||
uint32_t iResultType;
|
||||
b >> iResultType;
|
||||
fResultType = (CalpontSystemCatalog::ColDataType)iResultType;
|
||||
fResultType = (execplan::CalpontSystemCatalog::ColDataType)iResultType;
|
||||
b >> fResultscale;
|
||||
b >> fResultPrecision;
|
||||
b >> errorMsg;
|
||||
uint32_t frame;
|
||||
b >> frame;
|
||||
fStartFrame = (WF_FRAME)frame;
|
||||
fStartFrame = (execplan::WF_FRAME)frame;
|
||||
b >> frame;
|
||||
fEndFrame = (WF_FRAME)frame;
|
||||
fEndFrame = (execplan::WF_FRAME)frame;
|
||||
b >> fStartConstant;
|
||||
b >> fEndConstant;
|
||||
b >> fParamCount;
|
||||
|
@@ -78,8 +78,6 @@
|
||||
#include "wf_frame.h"
|
||||
#include "my_decimal_limits.h"
|
||||
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#else
|
||||
@@ -282,7 +280,7 @@ public:
|
||||
EXPORT bool isParamConstant(int paramIdx);
|
||||
|
||||
// For getting the result type.
|
||||
EXPORT CalpontSystemCatalog::ColDataType getResultType() const;
|
||||
EXPORT execplan::CalpontSystemCatalog::ColDataType getResultType() const;
|
||||
|
||||
// For getting the decimal characteristics for the return type.
|
||||
// These will be set to the default before init().
|
||||
@@ -291,7 +289,7 @@ public:
|
||||
|
||||
// If you want to change the result type
|
||||
// valid in init()
|
||||
EXPORT bool setResultType(CalpontSystemCatalog::ColDataType resultType);
|
||||
EXPORT bool setResultType(execplan::CalpontSystemCatalog::ColDataType resultType);
|
||||
|
||||
// For setting the decimal characteristics for the return value.
|
||||
// This only makes sense if the return type is decimal, but should be set
|
||||
@@ -339,14 +337,14 @@ public:
|
||||
// If WF_PRECEEdING and/or WF_FOLLOWING, a start or end constant should
|
||||
// be included to say how many preceeding or following is the default
|
||||
// Set this during init()
|
||||
EXPORT bool setDefaultWindowFrame(WF_FRAME defaultStartFrame,
|
||||
WF_FRAME defaultEndFrame,
|
||||
EXPORT bool setDefaultWindowFrame(execplan::WF_FRAME defaultStartFrame,
|
||||
execplan::WF_FRAME defaultEndFrame,
|
||||
int32_t startConstant = 0, // For WF_PRECEEDING or WF_FOLLOWING
|
||||
int32_t endConstant = 0); // For WF_PRECEEDING or WF_FOLLOWING
|
||||
|
||||
// There may be times you want to know the actual frame set by the caller
|
||||
EXPORT void getStartFrame(WF_FRAME& startFrame, int32_t& startConstant) const;
|
||||
EXPORT void getEndFrame(WF_FRAME& endFrame, int32_t& endConstant) const;
|
||||
EXPORT void getStartFrame(execplan::WF_FRAME& startFrame, int32_t& startConstant) const;
|
||||
EXPORT void getEndFrame(execplan::WF_FRAME& endFrame, int32_t& endConstant) const;
|
||||
|
||||
// Deep Equivalence
|
||||
bool operator==(const mcsv1Context& c) const;
|
||||
@@ -367,15 +365,15 @@ private:
|
||||
uint64_t fContextFlags; // Set by the framework to define this specific call.
|
||||
int32_t fUserDataSize;
|
||||
boost::shared_ptr<UserData> fUserData;
|
||||
CalpontSystemCatalog::ColDataType fResultType;
|
||||
execplan::CalpontSystemCatalog::ColDataType fResultType;
|
||||
int32_t fColWidth; // The length in bytes of the return type
|
||||
int32_t fResultscale; // For scale, the number of digits to the right of the decimal
|
||||
int32_t fResultPrecision; // The max number of digits allowed in the decimal value
|
||||
std::string errorMsg;
|
||||
uint32_t* dataFlags; // an integer array wirh one entry for each parameter
|
||||
bool* bInterrupted; // Gets set to true by the Framework if something happens
|
||||
WF_FRAME fStartFrame; // Is set to default to start, then modified by the actual frame in the call
|
||||
WF_FRAME fEndFrame; // Is set to default to start, then modified by the actual frame in the call
|
||||
execplan::WF_FRAME fStartFrame; // Is set to default to start, then modified by the actual frame in the call
|
||||
execplan::WF_FRAME fEndFrame; // Is set to default to start, then modified by the actual frame in the call
|
||||
int32_t fStartConstant; // for start frame WF_PRECEEDIMG or WF_FOLLOWING
|
||||
int32_t fEndConstant; // for end frame WF_PRECEEDIMG or WF_FOLLOWING
|
||||
std::string functionName;
|
||||
@@ -422,12 +420,12 @@ public:
|
||||
// For char, varchar, text, varbinary and blob types, columnData will be std::string.
|
||||
struct ColumnDatum
|
||||
{
|
||||
CalpontSystemCatalog::ColDataType dataType; // defined in calpontsystemcatalog.h
|
||||
execplan::CalpontSystemCatalog::ColDataType dataType; // defined in calpontsystemcatalog.h
|
||||
static_any::any columnData; // Not valid in init()
|
||||
uint32_t scale; // If dataType is a DECIMAL type
|
||||
uint32_t precision; // If dataType is a DECIMAL type
|
||||
std::string alias; // Only filled in for init()
|
||||
ColumnDatum() : dataType(CalpontSystemCatalog::UNDEFINED), scale(0), precision(-1) {};
|
||||
ColumnDatum() : dataType(execplan::CalpontSystemCatalog::UNDEFINED), scale(0), precision(-1) {};
|
||||
};
|
||||
|
||||
// Override mcsv1_UDAF to build your User Defined Aggregate (UDAF) and/or
|
||||
@@ -636,14 +634,14 @@ inline mcsv1Context::mcsv1Context() :
|
||||
fRunFlags(UDAF_OVER_ALLOWED | UDAF_ORDER_ALLOWED | UDAF_WINDOWFRAME_ALLOWED),
|
||||
fContextFlags(0),
|
||||
fUserDataSize(0),
|
||||
fResultType(CalpontSystemCatalog::UNDEFINED),
|
||||
fResultType(execplan::CalpontSystemCatalog::UNDEFINED),
|
||||
fColWidth(0),
|
||||
fResultscale(0),
|
||||
fResultPrecision(18),
|
||||
dataFlags(NULL),
|
||||
bInterrupted(NULL),
|
||||
fStartFrame(WF_UNBOUNDED_PRECEDING),
|
||||
fEndFrame(WF_CURRENT_ROW),
|
||||
fStartFrame(execplan::WF_UNBOUNDED_PRECEDING),
|
||||
fEndFrame(execplan::WF_CURRENT_ROW),
|
||||
fStartConstant(0),
|
||||
fEndConstant(0),
|
||||
func(NULL),
|
||||
@@ -774,12 +772,12 @@ inline bool mcsv1Context::isParamConstant(int paramIdx)
|
||||
return false;
|
||||
}
|
||||
|
||||
inline CalpontSystemCatalog::ColDataType mcsv1Context::getResultType() const
|
||||
inline execplan::CalpontSystemCatalog::ColDataType mcsv1Context::getResultType() const
|
||||
{
|
||||
return fResultType;
|
||||
}
|
||||
|
||||
inline bool mcsv1Context::setResultType(CalpontSystemCatalog::ColDataType resultType)
|
||||
inline bool mcsv1Context::setResultType(execplan::CalpontSystemCatalog::ColDataType resultType)
|
||||
{
|
||||
fResultType = resultType;
|
||||
return true; // We may want to sanity check here.
|
||||
@@ -878,8 +876,8 @@ inline void mcsv1Context::setUserData(UserData* userData)
|
||||
}
|
||||
}
|
||||
|
||||
inline bool mcsv1Context::setDefaultWindowFrame(WF_FRAME defaultStartFrame,
|
||||
WF_FRAME defaultEndFrame,
|
||||
inline bool mcsv1Context::setDefaultWindowFrame(execplan::WF_FRAME defaultStartFrame,
|
||||
execplan::WF_FRAME defaultEndFrame,
|
||||
int32_t startConstant,
|
||||
int32_t endConstant)
|
||||
{
|
||||
@@ -891,13 +889,13 @@ inline bool mcsv1Context::setDefaultWindowFrame(WF_FRAME defaultStartFrame,
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void mcsv1Context::getStartFrame(WF_FRAME& startFrame, int32_t& startConstant) const
|
||||
inline void mcsv1Context::getStartFrame(execplan::WF_FRAME& startFrame, int32_t& startConstant) const
|
||||
{
|
||||
startFrame = fStartFrame;
|
||||
startConstant = fStartConstant;
|
||||
}
|
||||
|
||||
inline void mcsv1Context::getEndFrame(WF_FRAME& endFrame, int32_t& endConstant) const
|
||||
inline void mcsv1Context::getEndFrame(execplan::WF_FRAME& endFrame, int32_t& endConstant) const
|
||||
{
|
||||
endFrame = fEndFrame;
|
||||
endConstant = fEndConstant;
|
||||
|
@@ -65,7 +65,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -59,7 +59,7 @@ mcsv1_UDAF::ReturnCode ssq::init(mcsv1Context* context,
|
||||
}
|
||||
|
||||
context->setUserDataSize(sizeof(ssq_data));
|
||||
context->setResultType(CalpontSystemCatalog::DOUBLE);
|
||||
context->setResultType(execplan::CalpontSystemCatalog::DOUBLE);
|
||||
context->setColWidth(8);
|
||||
context->setScale(context->getScale() * 2);
|
||||
context->setPrecision(19);
|
||||
|
@@ -65,7 +65,6 @@
|
||||
#include "mcsv1_udaf.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "windowfunctioncolumn.h"
|
||||
using namespace execplan;
|
||||
|
||||
#if defined(_MSC_VER) && defined(xxxRGNODE_DLLEXPORT)
|
||||
#define EXPORT __declspec(dllexport)
|
||||
|
@@ -199,9 +199,9 @@ public:
|
||||
fStep = step;
|
||||
}
|
||||
|
||||
void constParms(const std::vector<SRCP>& functionParms);
|
||||
void constParms(const std::vector<execplan::SRCP>& functionParms);
|
||||
|
||||
static boost::shared_ptr<WindowFunctionType> makeWindowFunction(const std::string&, int ct, WindowFunctionColumn* wc);
|
||||
static boost::shared_ptr<WindowFunctionType> makeWindowFunction(const std::string&, int ct, execplan::WindowFunctionColumn* wc);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -255,7 +255,7 @@ protected:
|
||||
std::vector<int64_t> fFieldIndex;
|
||||
|
||||
// constant function parameters -- needed for udaf with constant
|
||||
std::vector<SRCP> fConstantParms;
|
||||
std::vector<execplan::SRCP> fConstantParms;
|
||||
|
||||
// row meta data
|
||||
rowgroup::RowGroup fRowGroup;
|
||||
|
Reference in New Issue
Block a user