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
build possible after lot of changes
This commit is contained in:
@@ -262,7 +262,7 @@ void FrameBoundExpressionRange<T>::validate()
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (this->fRow.getColType(this->fIndex[1]))
|
||||
switch (this->fRow.getColType(this->fIndex[1]).kind())
|
||||
{
|
||||
case execplan::CalpontSystemCatalog::TINYINT:
|
||||
case execplan::CalpontSystemCatalog::SMALLINT:
|
||||
|
@@ -557,7 +557,7 @@ void CompareRule::compileRules(const std::vector<IdbSortSpec>& spec, const rowgr
|
||||
|
||||
for (auto spec_el : spec)
|
||||
{
|
||||
switch (types[spec_el.fIndex])
|
||||
switch (types[spec_el.fIndex].kind())
|
||||
{
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
{
|
||||
@@ -804,7 +804,7 @@ bool EqualCompData::operator()(Row::Pointer a, Row::Pointer b)
|
||||
{
|
||||
CalpontSystemCatalog::ColDataType type = fRow1.getColType(*i);
|
||||
|
||||
switch (type)
|
||||
switch (type.kind())
|
||||
{
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
case CalpontSystemCatalog::SMALLINT:
|
||||
@@ -874,8 +874,8 @@ bool EqualCompData::operator()(Row::Pointer a, Row::Pointer b)
|
||||
{
|
||||
eq = false;
|
||||
uint64_t ec = ERR_WF_UNKNOWN_COL_TYPE;
|
||||
cerr << IDBErrorInfo::instance()->errorMsg(ec, type) << " @" << __FILE__ << ":" << __LINE__;
|
||||
throw IDBExcept(IDBErrorInfo::instance()->errorMsg(ec, type), ec);
|
||||
cerr << IDBErrorInfo::instance()->errorMsg(ec, type.kind()) << " @" << __FILE__ << ":" << __LINE__;
|
||||
throw IDBExcept(IDBErrorInfo::instance()->errorMsg(ec, type.kind()), ec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -228,7 +228,7 @@ void WF_lead_lag<T>::operator()(int64_t b, int64_t e, int64_t /*c*/)
|
||||
if (o < b || o > e || fOffsetNull) // out of bound
|
||||
{
|
||||
T* v = (fDefNull) ? NULL : &fDefault;
|
||||
setValue(fRow.getColType(fFieldIndex[0]), b, e, c, v);
|
||||
setValue(fRow.getColType(fFieldIndex[0]).kind(), b, e, c, v);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ void WF_lead_lag<T>::operator()(int64_t b, int64_t e, int64_t /*c*/)
|
||||
else if (!fDefNull)
|
||||
v = &fDefault;
|
||||
|
||||
setValue(fRow.getColType(fFieldIndex[0]), b, e, c, v);
|
||||
setValue(fRow.getColType(fFieldIndex[0]).kind(), b, e, c, v);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -291,7 +291,7 @@ void WF_lead_lag<T>::operator()(int64_t b, int64_t e, int64_t /*c*/)
|
||||
else if (!fDefNull)
|
||||
v = &fDefault;
|
||||
|
||||
setValue(fRow.getColType(fFieldIndex[0]), b, e, c, v);
|
||||
setValue(fRow.getColType(fFieldIndex[0]).kind(), b, e, c, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -169,7 +169,7 @@ void WF_min_max<T>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
}
|
||||
|
||||
T* v = ((fCount > 0) ? &fValue : NULL);
|
||||
setValue(fRow.getColType(fFieldIndex[0]), b, e, c, v);
|
||||
setValue(fRow.getColType(fFieldIndex[0]).kind(), b, e, c, v);
|
||||
|
||||
fPrev = c;
|
||||
}
|
||||
|
@@ -263,7 +263,7 @@ void WF_nth_value<T>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
}
|
||||
|
||||
T* v = (isNull) ? NULL : &fValue;
|
||||
setValue(fRow.getColType(fFieldIndex[0]), b, e, c, v);
|
||||
setValue(fRow.getColType(fFieldIndex[0]).kind(), b, e, c, v);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -251,7 +251,7 @@ void WF_percentile<T>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
break;
|
||||
|
||||
fRow.setData(getPointer(fRowData->at(c)));
|
||||
setValue(fRow.getColType(fFieldIndex[0]), b, e, c, (T*)NULL);
|
||||
setValue(fRow.getColType(fFieldIndex[0]).kind(), b, e, c, (T*)NULL);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -300,7 +300,7 @@ void WF_percentile<T>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
|
||||
T* p = NULL;
|
||||
T v;
|
||||
int ct = (fFunctionId == WF__PERCENTILE_CONT) ? CalpontSystemCatalog::DOUBLE : fRow.getColType(idx);
|
||||
int ct = (fFunctionId == WF__PERCENTILE_CONT) ? CalpontSystemCatalog::DOUBLE : fRow.getColType(idx).kind();
|
||||
|
||||
if (b1 != -1)
|
||||
{
|
||||
|
@@ -297,8 +297,7 @@ void WF_sum_avg<T_IN, T_OUT>::operator()(int64_t b, int64_t e, int64_t c)
|
||||
v = &fSum;
|
||||
}
|
||||
|
||||
setValue(fRow.getColType(colOut), b, e, c, v);
|
||||
|
||||
setValue(fRow.getColType(colOut).kind(), b, e, c, v);
|
||||
fPrev = c;
|
||||
}
|
||||
|
||||
|
@@ -175,7 +175,7 @@ bool WF_udaf::dropValues(int64_t b, int64_t e)
|
||||
|
||||
if (!bSkipIt && !(flags[k] & mcsv1sdk::PARAM_IS_NULL))
|
||||
{
|
||||
switch (datum.dataType)
|
||||
switch (datum.dataType.kind())
|
||||
{
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
case CalpontSystemCatalog::SMALLINT:
|
||||
@@ -492,7 +492,7 @@ bool WF_udaf::dropValues(int64_t b, int64_t e)
|
||||
|
||||
default:
|
||||
{
|
||||
string errStr = "(" + colType2String[(int)datum.dataType] + ")";
|
||||
string errStr = "(" + colType2String[(int)datum.dataType.kind()] + ")";
|
||||
errStr = IDBErrorInfo::instance()->errorMsg(ERR_WF_INVALID_PARM_TYPE, errStr);
|
||||
cerr << errStr << endl;
|
||||
throw IDBExcept(errStr, ERR_WF_INVALID_PARM_TYPE);
|
||||
@@ -686,11 +686,11 @@ void WF_udaf::SetUDAFValue(static_any::any& valOut, int64_t colOut, int64_t b, i
|
||||
case execplan::CalpontSystemCatalog::UDECIMAL:
|
||||
if (valOut.empty())
|
||||
{
|
||||
setValue(colDataType, b, e, c, (int64_t*)NULL);
|
||||
setValue(colDataType.kind(), b, e, c, (int64_t*)NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue(colDataType, b, e, c, &intOut);
|
||||
setValue(colDataType.kind(), b, e, c, &intOut);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -705,11 +705,11 @@ void WF_udaf::SetUDAFValue(static_any::any& valOut, int64_t colOut, int64_t b, i
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
if (valOut.empty())
|
||||
{
|
||||
setValue(colDataType, b, e, c, (uint64_t*)NULL);
|
||||
setValue(colDataType.kind(), b, e, c, (uint64_t*)NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue(colDataType, b, e, c, &uintOut);
|
||||
setValue(colDataType.kind(), b, e, c, &uintOut);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -717,11 +717,11 @@ void WF_udaf::SetUDAFValue(static_any::any& valOut, int64_t colOut, int64_t b, i
|
||||
case execplan::CalpontSystemCatalog::UFLOAT:
|
||||
if (valOut.empty())
|
||||
{
|
||||
setValue(colDataType, b, e, c, (float*)NULL);
|
||||
setValue(colDataType.kind(), b, e, c, (float*)NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue(colDataType, b, e, c, &floatOut);
|
||||
setValue(colDataType.kind(), b, e, c, &floatOut);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -729,22 +729,22 @@ void WF_udaf::SetUDAFValue(static_any::any& valOut, int64_t colOut, int64_t b, i
|
||||
case execplan::CalpontSystemCatalog::UDOUBLE:
|
||||
if (valOut.empty())
|
||||
{
|
||||
setValue(colDataType, b, e, c, (double*)NULL);
|
||||
setValue(colDataType.kind(), b, e, c, (double*)NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue(colDataType, b, e, c, &doubleOut);
|
||||
setValue(colDataType.kind(), b, e, c, &doubleOut);
|
||||
}
|
||||
break;
|
||||
|
||||
case execplan::CalpontSystemCatalog::LONGDOUBLE:
|
||||
if (valOut.empty())
|
||||
{
|
||||
setValue(colDataType, b, e, c, (long double*)NULL);
|
||||
setValue(colDataType.kind(), b, e, c, (long double*)NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue(colDataType, b, e, c, &longdoubleOut);
|
||||
setValue(colDataType.kind(), b, e, c, &longdoubleOut);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -756,19 +756,19 @@ void WF_udaf::SetUDAFValue(static_any::any& valOut, int64_t colOut, int64_t b, i
|
||||
case execplan::CalpontSystemCatalog::BLOB:
|
||||
if (valOut.empty())
|
||||
{
|
||||
setValue(colDataType, b, e, c, (utils::NullString*)NULL);
|
||||
setValue(colDataType.kind(), b, e, c, (utils::NullString*)NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
utils::NullString nullStrOut(strOut);
|
||||
setValue(colDataType, b, e, c, &nullStrOut);
|
||||
setValue(colDataType.kind(), b, e, c, &nullStrOut);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
std::ostringstream errmsg;
|
||||
errmsg << "WF_udaf: No logic for data type: " << colDataType;
|
||||
errmsg << "WF_udaf: No logic for data type: " << colDataType.kind();
|
||||
cerr << errmsg.str() << endl;
|
||||
throw runtime_error(errmsg.str().c_str());
|
||||
break;
|
||||
@@ -859,7 +859,7 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c)
|
||||
|
||||
if (!bSkipIt && !(flags[k] & mcsv1sdk::PARAM_IS_NULL))
|
||||
{
|
||||
switch (datum.dataType)
|
||||
switch (datum.dataType.kind())
|
||||
{
|
||||
case CalpontSystemCatalog::TINYINT:
|
||||
case CalpontSystemCatalog::SMALLINT:
|
||||
@@ -1145,7 +1145,7 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c)
|
||||
|
||||
default:
|
||||
{
|
||||
string errStr = "(" + colType2String[(int)datum.dataType] + ")";
|
||||
string errStr = "(" + colType2String[(int)datum.dataType.kind()] + ")";
|
||||
errStr = IDBErrorInfo::instance()->errorMsg(ERR_WF_INVALID_PARM_TYPE, errStr);
|
||||
cerr << errStr << endl;
|
||||
throw IDBExcept(errStr, ERR_WF_INVALID_PARM_TYPE);
|
||||
|
@@ -488,7 +488,7 @@ void WindowFunctionType::setValue(int ct, int64_t b, int64_t e, int64_t c, T* v)
|
||||
template <typename T>
|
||||
void WindowFunctionType::implicit2T(uint64_t i, T& t, int s)
|
||||
{
|
||||
int ct = fRow.getColType(i);
|
||||
int ct = fRow.getColType(i).kind();
|
||||
|
||||
switch (ct)
|
||||
{
|
||||
|
Reference in New Issue
Block a user