1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

chore(build): fixes to satisfy clang19 warnings

This commit is contained in:
Leonid Fedorov
2025-05-08 15:26:36 +00:00
committed by Leonid Fedorov
parent 9fd7f342a7
commit a0bee173f6
334 changed files with 3062 additions and 3323 deletions

View File

@ -37,7 +37,7 @@ using namespace rowgroup;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_abs::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -38,7 +38,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_add_time::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_add_time::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -244,7 +244,7 @@ int64_t Func_add_time::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm
}
int64_t Func_add_time::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t val1 = parm[0]->data()->getTimeIntVal(row, isNull);

View File

@ -38,14 +38,14 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_ascii::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_ascii::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_ascii::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
const auto& str = parm[0]->data()->getStrVal(row, isNull);

View File

@ -258,7 +258,7 @@ inline bool getBool(rowgroup::Row& row, funcexp::FunctionParm& pm, bool& isNull,
return !isNull && strGE(cs, val, pm[1]->data()->getStrVal(row, isNull).safeString("")) &&
strLE(cs, val, pm[2]->data()->getStrVal(row, isNull).safeString(""));
}
break; // XXX: gcc falsely complains here.
break; // XXX: gcc falsely complains here.
default:
{
@ -330,7 +330,8 @@ CalpontSystemCatalog::ColType Func_between::operationType(FunctionParm& fp,
if (cc)
{
Result result = cc->result();
result.intVal = dataconvert::DataConvert::timestampToInt(result.strVal.safeString(""), resultType.getTimeZone());
result.intVal =
dataconvert::DataConvert::timestampToInt(result.strVal.safeString(""), resultType.getTimeZone());
cc->result(result);
}
}
@ -362,7 +363,7 @@ bool Func_between::getBoolVal(rowgroup::Row& row, FunctionParm& pm, bool& isNull
}
CalpontSystemCatalog::ColType Func_notbetween::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
PredicateOperator* op = new PredicateOperator();
CalpontSystemCatalog::ColType ct;

View File

@ -71,7 +71,7 @@ datatypes::TUInt64Null ConvertToBitOperand(const T& val)
}
static datatypes::TUInt64Null DecimalToBitOperand(Row& row, const execplan::SPTP& parm,
const funcexp::Func& thisFunc)
const funcexp::Func& /*thisFunc*/)
{
bool tmpIsNull = false;
datatypes::Decimal d = parm->data()->getDecimalVal(row, tmpIsNull);
@ -253,10 +253,9 @@ class Func_bitwise_null : public Func_BitOp
Func_bitwise_null() : Func_BitOp("bitwise")
{
}
int64_t getIntVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& operationColType) override
int64_t getIntVal(Row& /*row*/, FunctionParm& /*parm*/, bool& /*isNull*/,
CalpontSystemCatalog::ColType& /*operationColType*/) override
{
isNull = true;
return 0;
}
};

View File

@ -52,43 +52,43 @@ struct lconv* convData = localeconv();
namespace funcexp
{
// Why isn't "return resultType" the base default behavior?
CalpontSystemCatalog::ColType Func_cast_signed::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_signed::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
CalpontSystemCatalog::ColType Func_cast_unsigned::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_unsigned::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
CalpontSystemCatalog::ColType Func_cast_char::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_char::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
CalpontSystemCatalog::ColType Func_cast_date::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_date::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
CalpontSystemCatalog::ColType Func_cast_datetime::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_datetime::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
CalpontSystemCatalog::ColType Func_cast_decimal::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_decimal::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
CalpontSystemCatalog::ColType Func_cast_double::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_cast_double::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -45,24 +45,27 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_ceil::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
inline int64_t ceilDateTime(Row& row, FunctionParm& parm, bool& isNull)
{
// the following is to handle the case of ceil(datetime), the last 20 bits are the miliseconds, the -1 is to make sure it could round up
// the following is to handle the case of ceil(datetime), the last 20 bits are the miliseconds, the -1 is to
// make sure it could round up
return parm[0]->data()->getDatetimeIntVal(row, isNull) + 0xffffe;
}
inline int64_t ceilTimeStamp(Row& row, FunctionParm& parm, bool& isNull)
{
// the following is to handle the case of ceil(timestamp), the last 20 bits are the miliseconds, the -1 is to make sure it could round up
// the following is to handle the case of ceil(timestamp), the last 20 bits are the miliseconds, the -1 is
// to make sure it could round up
return parm[0]->data()->getTimestampIntVal(row, isNull) + 0xffffe;
}
inline int64_t ceilTime(Row& row, FunctionParm& parm, bool& isNull)
{
// the following is to handle the case of ceil(time), the last 24 bits are the miliseconds, the -1 is to make sure it could round up
// the following is to handle the case of ceil(time), the last 24 bits are the miliseconds, the -1 is to
// make sure it could round up
return parm[0]->data()->getTimeIntVal(row, isNull) + 0xfffffe;
}

View File

@ -79,7 +79,7 @@ inline size_t getChar(int32_t num, char*& buf)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_char::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -43,7 +43,7 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_char_length::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}

View File

@ -39,14 +39,14 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_coalesce::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_coalesce::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_coalesce::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t val = 0;
@ -68,7 +68,7 @@ int64_t Func_coalesce::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& i
}
string Func_coalesce::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
string val;
@ -90,7 +90,7 @@ string Func_coalesce::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
int32_t Func_coalesce::getDateIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t val = 0;
@ -112,7 +112,7 @@ int32_t Func_coalesce::getDateIntVal(rowgroup::Row& row, FunctionParm& parm, boo
}
int64_t Func_coalesce::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t val = 0;
@ -134,7 +134,7 @@ int64_t Func_coalesce::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm,
}
int64_t Func_coalesce::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t val = 0;
@ -156,7 +156,7 @@ int64_t Func_coalesce::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm
}
int64_t Func_coalesce::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t val = 0;
@ -178,7 +178,7 @@ int64_t Func_coalesce::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, boo
}
double Func_coalesce::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
double d = 0.0;
@ -200,7 +200,7 @@ double Func_coalesce::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
long double Func_coalesce::getLongDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
long double d = 0.0;
@ -222,7 +222,7 @@ long double Func_coalesce::getLongDoubleVal(rowgroup::Row& row, FunctionParm& pa
}
execplan::IDB_Decimal Func_coalesce::getDecimalVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
IDB_Decimal d;

View File

@ -31,7 +31,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_concat_oracle::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -35,14 +35,14 @@ using namespace rowgroup;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_concat_ws::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
string Func_concat_ws::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
string delim;
stringValue(parm[0], row, isNull, delim);
@ -51,7 +51,7 @@ string Func_concat_ws::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
// TODO: I don't think we need wide chars here.
// Concatenation works without see Server implementation.
#if 0
#if 0
wstring wstr;
size_t strwclen = utf8::idb_mbstowcs(0, delim.c_str(), 0) + 1;
wchar_t* wcbuf = new wchar_t[strwclen];
@ -61,7 +61,7 @@ string Func_concat_ws::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
for ( unsigned int id = 1 ; id < parm.size() ; id++)
{
string tstr;
stringValue(parm[id], row, isNull, tstr);
stringValue(parm[id], row, isNull, tstr);
if (isNull)
{
isNull = false;
@ -105,7 +105,7 @@ string Func_concat_ws::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
continue;
}
if (!firstTime) // XXX: XXX: XXX: concatenation of empty strings will result in empty string.
if (!firstTime) // XXX: XXX: XXX: concatenation of empty strings will result in empty string.
str += delim;
firstTime = false;
@ -114,7 +114,8 @@ string Func_concat_ws::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
str += tmp;
}
if (firstTime) {
if (firstTime)
{
// all arguments are NULL.
isNull = true;
return str;

View File

@ -268,14 +268,14 @@ const char* convNumToStr(int64_t val, char* dst, int radix)
} // namespace helpers
CalpontSystemCatalog::ColType Func_conv::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
string Func_conv::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
const auto& res = parm[0]->data()->getStrVal(row, isNull);
string str;

View File

@ -42,7 +42,7 @@ namespace funcexp
{
// need my_tz_find in dataconvert
CalpontSystemCatalog::ColType Func_convert_tz::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_convert_tz::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -55,7 +55,7 @@ int64_t Func_convert_tz::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& par
}
int64_t Func_convert_tz::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
messageqcpp::ByteStream bs;
bool bFromTz = false;

View File

@ -36,14 +36,14 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_crc32::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_crc32::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_crc32::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
unsigned crc;
switch (parm.size())

View File

@ -40,7 +40,7 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_date::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_date::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -718,7 +718,7 @@ uint64_t dateAdd(uint64_t time, const string& expr, IntervalColumn::interval_typ
}
} // namespace helpers
CalpontSystemCatalog::ColType Func_date_add::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_date_add::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
resultType.colDataType = CalpontSystemCatalog::DATETIME;
@ -760,7 +760,8 @@ int64_t Func_date_add::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& i
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
val = dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull).safeString(""));
val =
dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull).safeString(""));
break;
}
@ -821,7 +822,8 @@ int64_t Func_date_add::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& i
else
funcType = static_cast<OpType>(parm[3]->data()->getIntVal(row, isNull));
uint64_t value = helpers::dateAdd(val, parm[1]->data()->getStrVal(row, isNull).safeString(""), unit, dateType, funcType);
uint64_t value =
helpers::dateAdd(val, parm[1]->data()->getStrVal(row, isNull).safeString(""), unit, dateType, funcType);
if (value == 0)
isNull = true;

View File

@ -59,13 +59,9 @@ const string IDB_date_format(const DateTime& dt, const string& format, bool& isN
switch (format[i])
{
case 'M':
oss << helpers::monthFullNames[dt.month];
break;
case 'M': oss << helpers::monthFullNames[dt.month]; break;
case 'b':
oss << helpers::monthAbNames[dt.month].c_str();
break;
case 'b': oss << helpers::monthAbNames[dt.month].c_str(); break;
case 'W':
weekday = helpers::calc_mysql_weekday(dt.year, dt.month, dt.day, false, isNull);
@ -83,9 +79,7 @@ const string IDB_date_format(const DateTime& dt, const string& format, bool& isN
oss << helpers::weekdayAbNames[weekday];
break;
case 'D':
oss << helpers::dayOfMonth[dt.day].c_str();
break;
case 'D': oss << helpers::dayOfMonth[dt.day].c_str(); break;
case 'Y':
sprintf(buf, "%04d", dt.year);
@ -227,8 +221,8 @@ const string IDB_date_format(const DateTime& dt, const string& format, bool& isN
}
} // namespace helpers
CalpontSystemCatalog::ColType Func_date_format::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_date_format::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& /*resultType*/)
{
CalpontSystemCatalog::ColType ct;
ct.colDataType = CalpontSystemCatalog::VARCHAR;

View File

@ -35,7 +35,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_day::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_day::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -80,7 +80,8 @@ int64_t Func_day::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
case CalpontSystemCatalog::CHAR:
case CalpontSystemCatalog::TEXT:
case CalpontSystemCatalog::VARCHAR:
val = dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull).safeString(""));
val =
dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull).safeString(""));
if (val == -1)
{

View File

@ -36,7 +36,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_dayname::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_dayname::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -97,7 +97,8 @@ int64_t Func_dayname::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& is
case CalpontSystemCatalog::CHAR:
case CalpontSystemCatalog::TEXT:
case CalpontSystemCatalog::VARCHAR:
val = dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull).safeString(""));
val =
dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull).safeString(""));
if (val == -1)
{

View File

@ -36,7 +36,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_dayofweek::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_dayofweek::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -96,29 +96,29 @@ int64_t Func_dayofweek::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
case CalpontSystemCatalog::CHAR:
case CalpontSystemCatalog::TEXT:
case CalpontSystemCatalog::VARCHAR:
{
const auto& valStr = parm[0]->data()->getStrVal(row, isNull);
if (valStr.isNull())
{
const auto& valStr = parm[0]->data()->getStrVal(row, isNull);
if (valStr.isNull())
{
isNull = true;
return -1;
}
val = dataconvert::DataConvert::stringToDatetime(valStr.safeString(""));
if (val == -1)
{
isNull = true;
return -1;
}
else
{
year = (uint32_t)((val >> 48) & 0xffff);
month = (uint32_t)((val >> 44) & 0xf);
day = (uint32_t)((val >> 38) & 0x3f);
}
isNull = true;
return -1;
}
break;
val = dataconvert::DataConvert::stringToDatetime(valStr.safeString(""));
if (val == -1)
{
isNull = true;
return -1;
}
else
{
year = (uint32_t)((val >> 48) & 0xffff);
month = (uint32_t)((val >> 44) & 0xf);
day = (uint32_t)((val >> 38) & 0x3f);
}
}
break;
case CalpontSystemCatalog::BIGINT:
case CalpontSystemCatalog::MEDINT:

View File

@ -36,7 +36,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_dayofyear::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_dayofyear::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -45,7 +45,7 @@ void Func_decode::hash_password(ulong* result, const char* password, uint passwo
result[1] = nr2 & (((ulong)1L << 31) - 1L);
}
CalpontSystemCatalog::ColType Func_decode::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_decode::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -38,14 +38,14 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_div::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_div::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_div::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
double val1 = parm[0]->data()->getDoubleVal(row, isNull);
double val2 = parm[1]->data()->getDoubleVal(row, isNull);
@ -58,7 +58,7 @@ int64_t Func_div::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
// MCOL-179 InnoDB doesn't round or convert to int before dividing.
return static_cast<int64_t>(val1 / val2);
#if 0
#if 0
int64_t int_val2 = (int64_t)(val2 > 0 ? val2 + 0.5 : val2 - 0.5);
if (int_val2 == 0)
@ -81,7 +81,7 @@ int64_t Func_div::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
}
uint64_t Func_div::getUintVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
uint64_t val1 = parm[0]->data()->getUintVal(row, isNull);
uint64_t val2 = parm[1]->data()->getUintVal(row, isNull);

View File

@ -38,7 +38,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_elt::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_elt::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -46,7 +46,7 @@ void Func_encode::hash_password(ulong* result, const char* password, uint passwo
result[1] = nr2 & (((ulong)1L << 31) - 1L);
}
CalpontSystemCatalog::ColType Func_encode::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_encode::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -42,7 +42,7 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_exp::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -177,7 +177,7 @@ long long timeGet(uint64_t time, IntervalColumn::interval_type unit)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_extract::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_extract::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -44,7 +44,7 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_find_in_set::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_find_in_set::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -41,7 +41,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_floor::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -224,8 +224,8 @@ uint64_t Func_floor::getUintVal(Row& row, FunctionParm& parm, bool& isNull,
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
string str =
DataConvert::timestampToString1(parm[0]->data()->getTimestampIntVal(row, isNull), op_ct.getTimeZone());
string str = DataConvert::timestampToString1(parm[0]->data()->getTimestampIntVal(row, isNull),
op_ct.getTimeZone());
// strip off micro seconds
str = str.substr(0, 14);
@ -518,8 +518,8 @@ IDB_Decimal Func_floor::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull
case execplan::CalpontSystemCatalog::TIMESTAMP:
{
string str =
DataConvert::timestampToString1(parm[0]->data()->getTimestampIntVal(row, isNull), op_ct.getTimeZone());
string str = DataConvert::timestampToString1(parm[0]->data()->getTimestampIntVal(row, isNull),
op_ct.getTimeZone());
// strip off micro seconds
str = str.substr(0, 14);

View File

@ -37,7 +37,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_from_days::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_from_days::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -62,7 +62,7 @@ int32_t Func_from_days::getDateIntVal(rowgroup::Row& row, FunctionParm& parm, bo
}
int64_t Func_from_days::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
double val1 = parm[0]->data()->getDoubleVal(row, isNull);
int64_t daynr = (int64_t)(val1 > 0 ? val1 + 0.5 : val1 - 0.5);

View File

@ -114,8 +114,8 @@ DateTime getDateTime(rowgroup::Row& row, FunctionParm& parm, bool& isNull)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_from_unixtime::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_from_unixtime::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& /*resultType*/)
{
CalpontSystemCatalog::ColType ct;
ct.colDataType = CalpontSystemCatalog::VARCHAR;
@ -152,7 +152,7 @@ int32_t Func_from_unixtime::getDateIntVal(rowgroup::Row& row, FunctionParm& parm
}
int64_t Func_from_unixtime::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
DateTime dt = getDateTime(row, parm, isNull);
@ -166,7 +166,7 @@ int64_t Func_from_unixtime::getDatetimeIntVal(rowgroup::Row& row, FunctionParm&
}
int64_t Func_from_unixtime::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
DateTime dt = getDateTime(row, parm, isNull);
@ -180,7 +180,7 @@ int64_t Func_from_unixtime::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm
}
int64_t Func_from_unixtime::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
DateTime dt = getDateTime(row, parm, isNull);

View File

@ -53,7 +53,7 @@ string known_date_time_formats[5][4] = {{"USA", "%m.%d.%Y", "%Y-%m-%d %H.%i.%s",
string know_types[3] = {"DATE", "DATETIME", "TIME"};
CalpontSystemCatalog::ColType Func_get_format::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_get_format::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -98,9 +98,7 @@ string Func_get_format::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool&
{
case 0: return known_date_time_formats[i][2]; break;
default:
isNull = true;
return "";
default: isNull = true; return "";
}
}
}

View File

@ -41,7 +41,7 @@ using namespace funcexp;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_greatest::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_greatest::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
// operation type is not used by this functor
@ -50,7 +50,7 @@ CalpontSystemCatalog::ColType Func_greatest::operationType(FunctionParm& fp,
}
int64_t Func_greatest::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
double str = fp[0]->data()->getDoubleVal(row, isNull);
@ -68,7 +68,7 @@ int64_t Func_greatest::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isN
}
uint64_t Func_greatest::getUintVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
double str = fp[0]->data()->getDoubleVal(row, isNull);
@ -86,7 +86,7 @@ uint64_t Func_greatest::getUintVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
double Func_greatest::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
double str = fp[0]->data()->getDoubleVal(row, isNull);
@ -104,7 +104,7 @@ double Func_greatest::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
long double Func_greatest::getLongDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
long double str = fp[0]->data()->getLongDoubleVal(row, isNull);
@ -122,7 +122,7 @@ long double Func_greatest::getLongDoubleVal(rowgroup::Row& row, FunctionParm& fp
}
std::string Func_greatest::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
const auto& str = fp[0]->data()->getStrVal(row, isNull);
CHARSET_INFO* cs = fp[0]->data()->resultType().getCharset();
@ -143,7 +143,7 @@ std::string Func_greatest::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool&
}
IDB_Decimal Func_greatest::getDecimalVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
// double str = fp[0]->data()->getDoubleVal(row, isNull);
IDB_Decimal str = fp[0]->data()->getDecimalVal(row, isNull);
@ -162,7 +162,7 @@ IDB_Decimal Func_greatest::getDecimalVal(Row& row, FunctionParm& fp, bool& isNul
}
int32_t Func_greatest::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int32_t str = fp[0]->data()->getDateIntVal(row, isNull);
@ -180,7 +180,7 @@ int32_t Func_greatest::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool&
}
int64_t Func_greatest::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t str = fp[0]->data()->getDatetimeIntVal(row, isNull);
@ -198,7 +198,7 @@ int64_t Func_greatest::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp, b
}
int64_t Func_greatest::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t str = fp[0]->data()->getTimestampIntVal(row, isNull);
@ -216,7 +216,7 @@ int64_t Func_greatest::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp,
}
int64_t Func_greatest::getTimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
// Strip off unused day
int64_t greatestStr = fp[0]->data()->getTimeIntVal(row, isNull);

View File

@ -55,7 +55,7 @@ void octet2hex(char* to, const char* str, uint32_t len)
*to = '\0';
}
CalpontSystemCatalog::ColType Func_hex::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_hex::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -79,7 +79,7 @@ string Func_hex::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
case CalpontSystemCatalog::TIME:
{
const auto& arg = parm[0]->data()->getStrVal(row, isNull);
scoped_array<char> hexPtr(new char[arg.length() * 2 + 1]); // XXX: code now the same as for BLOB.
scoped_array<char> hexPtr(new char[arg.length() * 2 + 1]); // XXX: code now the same as for BLOB.
octet2hex(hexPtr.get(), arg.str(), arg.length());
return string(hexPtr.get(), arg.length() * 2);
}

View File

@ -35,7 +35,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_hour::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_hour::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -43,8 +43,8 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_idbpartition::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_idbpartition::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& /*resultType*/)
{
// all integer
CalpontSystemCatalog::ColType ct;
@ -54,7 +54,7 @@ CalpontSystemCatalog::ColType Func_idbpartition::operationType(FunctionParm& fp,
}
string Func_idbpartition::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
LogicalPartition part(parm[0]->data()->getIntVal(row, isNull), parm[1]->data()->getIntVal(row, isNull),
parm[2]->data()->getIntVal(row, isNull));

View File

@ -45,7 +45,7 @@ namespace funcexp
//
CalpontSystemCatalog::ColType Func_ifnull::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -297,7 +297,7 @@ inline bool getBoolForIn(rowgroup::Row& row, funcexp::FunctionParm& pm, bool& is
namespace funcexp
{
CalpontSystemCatalog::ColType Func_in::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
PredicateOperator op;
CalpontSystemCatalog::ColType ct;
@ -371,7 +371,7 @@ bool Func_in::getBoolVal(rowgroup::Row& row, FunctionParm& pm, bool& isNull,
}
CalpontSystemCatalog::ColType Func_notin::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
PredicateOperator* op = new PredicateOperator();
CalpontSystemCatalog::ColType ct;

View File

@ -27,7 +27,7 @@
#include "functioncolumn.h"
#include "joblisttypes.h"
#include "rowgroup.h"
//#include <iostream> // included when debugging
// #include <iostream> // included when debugging
namespace funcexp
{
@ -36,7 +36,7 @@ namespace funcexp
// See mcs_add in udfsdk.h for explanation of this function.
//------------------------------------------------------------------------------
execplan::CalpontSystemCatalog::ColType Func_inet_aton::operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType)
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType(); // input type
}
@ -46,7 +46,7 @@ execplan::CalpontSystemCatalog::ColType Func_inet_aton::operationType(
// SELECT ... WHERE inet_aton(ipstring) = 11111111 will call getIntVal()
//------------------------------------------------------------------------------
int64_t Func_inet_aton::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_aton::getIntVal" << std::endl;
@ -70,7 +70,7 @@ int64_t Func_inet_aton::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& is
// SELECT ... WHERE inet_aton(ipstring) = '11111111' will call getDoubleVal()
//------------------------------------------------------------------------------
double Func_inet_aton::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_aton::getDoubleVal" << std::endl;
@ -98,7 +98,7 @@ double Func_inet_aton::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool&
// Don't know if this function will ever be called.
//------------------------------------------------------------------------------
std::string Func_inet_aton::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_aton::getStrVal" << std::endl;
@ -122,7 +122,7 @@ std::string Func_inet_aton::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool
// Don't know if this function will ever be called.
//------------------------------------------------------------------------------
bool Func_inet_aton::getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
bool bValue = false;
@ -144,7 +144,7 @@ bool Func_inet_aton::getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNu
// SELECT ... WHERE inet_aton(ipstring) = 11111111. will call getDecimalVal()
//------------------------------------------------------------------------------
execplan::IDB_Decimal Func_inet_aton::getDecimalVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
execplan::CalpontSystemCatalog::ColType colType = fp[0]->data()->resultType();
@ -182,7 +182,7 @@ execplan::IDB_Decimal Func_inet_aton::getDecimalVal(rowgroup::Row& row, Function
// Don't know if this function will ever be called.
//------------------------------------------------------------------------------
int32_t Func_inet_aton::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int32_t iValue = joblist::DATENULL;
@ -206,7 +206,7 @@ int32_t Func_inet_aton::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool
// Don't know if this function will ever be called.
//------------------------------------------------------------------------------
int64_t Func_inet_aton::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t iValue = joblist::DATETIMENULL;
@ -224,7 +224,7 @@ int64_t Func_inet_aton::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp,
}
int64_t Func_inet_aton::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t iValue = joblist::TIMESTAMPNULL;
@ -242,7 +242,7 @@ int64_t Func_inet_aton::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp,
}
int64_t Func_inet_aton::getTimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t iValue = joblist::TIMENULL;

View File

@ -54,7 +54,7 @@ namespace funcexp
// See mcs_add in udfsdk.h for explanation of this function.
//------------------------------------------------------------------------------
execplan::CalpontSystemCatalog::ColType Func_inet_ntoa::operationType(
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType)
FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType(); // input type
}
@ -135,7 +135,7 @@ double Func_inet_ntoa::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool&
// This is the get function that makes sense to use.
//------------------------------------------------------------------------------
std::string Func_inet_ntoa::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_ntoa::getStrVal" << std::endl;
@ -178,8 +178,8 @@ std::string Func_inet_ntoa::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool
// Return IP address as a boolean.
// N/A so returning null. See explanation at the top of this source file.
//------------------------------------------------------------------------------
bool Func_inet_ntoa::getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
bool Func_inet_ntoa::getBoolVal(rowgroup::Row& /*row*/, FunctionParm& /*fp*/, bool& isNull,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_ntoa::getBoolVal" << std::endl;
bool bValue = false;
@ -192,8 +192,9 @@ bool Func_inet_ntoa::getBoolVal(rowgroup::Row& row, FunctionParm& fp, bool& isNu
// Return IP address as a decimal value.
// N/A so returning null. See explanation at the top of this source file.
//------------------------------------------------------------------------------
execplan::IDB_Decimal Func_inet_ntoa::getDecimalVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::IDB_Decimal Func_inet_ntoa::getDecimalVal(rowgroup::Row& /*row*/, FunctionParm& /*fp*/,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// IDB_Decimal dValue = fp[0]->data()->getDecimalVal(row, isNull);
execplan::IDB_Decimal dValue(joblist::NULL_INT64, 0, 0);
@ -206,8 +207,8 @@ execplan::IDB_Decimal Func_inet_ntoa::getDecimalVal(rowgroup::Row& row, Function
// Return IP address as a date.
// N/A so returning null. See explanation at the top of this source file.
//------------------------------------------------------------------------------
int32_t Func_inet_ntoa::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
int32_t Func_inet_ntoa::getDateIntVal(rowgroup::Row& /*row*/, FunctionParm& /*fp*/, bool& isNull,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_ntoa::getDateIntVal" << std::endl;
@ -222,8 +223,8 @@ int32_t Func_inet_ntoa::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool
// Return IP address as a date/time.
// N/A so returning null. See explanation at the top of this source file.
//------------------------------------------------------------------------------
int64_t Func_inet_ntoa::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
int64_t Func_inet_ntoa::getDatetimeIntVal(rowgroup::Row& /*row*/, FunctionParm& /*fp*/, bool& isNull,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_ntoa::getDatetimeVal" << std::endl;
@ -234,8 +235,8 @@ int64_t Func_inet_ntoa::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp,
return iValue;
}
int64_t Func_inet_ntoa::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
int64_t Func_inet_ntoa::getTimestampIntVal(rowgroup::Row& /*row*/, FunctionParm& /*fp*/, bool& isNull,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_ntoa::getTimestampVal" << std::endl;
@ -246,8 +247,8 @@ int64_t Func_inet_ntoa::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp,
return iValue;
}
int64_t Func_inet_ntoa::getTimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
int64_t Func_inet_ntoa::getTimeIntVal(rowgroup::Row& /*row*/, FunctionParm& /*fp*/, bool& isNull,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// std::cout << "In Func_inet_ntoa::getTimeVal" << std::endl;

View File

@ -40,7 +40,7 @@ using namespace utf8;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_insert::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -33,8 +33,8 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_instr::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_instr::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& /*resultType*/)
{
CalpontSystemCatalog::ColType ct;
ct.colDataType = CalpontSystemCatalog::VARCHAR;

View File

@ -38,7 +38,7 @@ using namespace rowgroup;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_isnull::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type of idb_isnull should be the same as the argument type
assert(fp.size() == 1);

View File

@ -14,14 +14,14 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_array_append::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_json_array_append::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_array_append::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto& js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -14,14 +14,14 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_array_insert::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_json_array_insert::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_array_insert::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto& js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -148,7 +148,7 @@ static bool checkContains(json_engine_t* jsEg, json_engine_t* valEg)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_contains::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -157,7 +157,7 @@ CalpontSystemCatalog::ColType Func_json_contains::operationType(FunctionParm& fp
* getBoolVal API definition
*/
bool Func_json_contains::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
bool isNullJS = false, isNullVal = false;
const auto& js = fp[0]->data()->getStrVal(row, isNullJS);

View File

@ -17,7 +17,7 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_contains_path::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& resultType)
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -26,7 +26,7 @@ CalpontSystemCatalog::ColType Func_json_contains_path::operationType(
* getBoolVal API definition
*/
bool Func_json_contains_path::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
const auto& js_ns = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -14,13 +14,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_depth::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
int64_t Func_json_depth::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -16,7 +16,7 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_equals::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -25,7 +25,7 @@ CalpontSystemCatalog::ColType Func_json_equals::operationType(FunctionParm& fp,
* getBoolVal API definition
*/
bool Func_json_equals::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
// auto release the DYNAMIC_STRING
using DynamicString = unique_ptr<DYNAMIC_STRING, decltype(&dynstr_free)>;
@ -54,7 +54,7 @@ bool Func_json_equals::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
const string_view js1 = js1_ns.unsafeStringRef();
const string_view js2 = js2_ns.unsafeStringRef();
bool result = false;
if (json_normalize(str1.get(), js1.data(), js1.size(), getCharset(fp[0])))
{

View File

@ -13,7 +13,7 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_exists::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -22,7 +22,7 @@ CalpontSystemCatalog::ColType Func_json_exists::operationType(FunctionParm& fp,
* getBoolVal API definition
*/
bool Func_json_exists::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -143,17 +143,16 @@ int Func_json_extract::doExtract(Row& row, FunctionParm& fp, json_value_types* t
retJS.swap(tmp);
return 0;
}
CalpontSystemCatalog::ColType Func_json_extract::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_extract::getStrVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
string retJS;
json_value_types valType;
@ -164,8 +163,8 @@ string Func_json_extract::getStrVal(Row& row, FunctionParm& fp, bool& isNull,
return "";
}
int64_t Func_json_extract::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
int64_t Func_json_extract::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& /*isNull*/,
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
string retJS;
json_value_types valType;
@ -190,8 +189,8 @@ int64_t Func_json_extract::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool&
return ret;
}
double Func_json_extract::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
double Func_json_extract::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& /*isNull*/,
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
string retJS;
json_value_types valType;
@ -217,7 +216,7 @@ double Func_json_extract::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, boo
}
execplan::IDB_Decimal Func_json_extract::getDecimalVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
json_value_types valType;
string retJS;

View File

@ -17,13 +17,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_format::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_format::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto& js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -15,13 +15,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_insert::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_insert::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto& js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -46,18 +46,18 @@ bool checkKeyInList(const string& res, const uchar* key, const int keyLen)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_keys::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_keys::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)
return "";
IntType keySize = 0;
string ret;
json_engine_t jsEg;

View File

@ -15,13 +15,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_length::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
int64_t Func_json_length::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
const auto& js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -209,13 +209,13 @@ int doMerge(string& retJS, json_engine_t* jsEg1, json_engine_t* jsEg2)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_merge::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_merge::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -260,14 +260,14 @@ int doMergePatch(string& retJS, json_engine_t* jsEg1, json_engine_t* jsEg2, bool
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_merge_patch::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_json_merge_patch::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_merge_patch::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
// JSON_MERGE_PATCH return NULL if any argument is NULL
bool isEmpty = false, hasNullArg = false;

View File

@ -16,14 +16,14 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_normalize::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_json_normalize::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_normalize::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto js_ns = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -267,7 +267,7 @@ bool checkOverlaps(json_engine_t* jsEg1, json_engine_t* jsEg2, bool compareWhole
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_overlaps::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -275,8 +275,8 @@ CalpontSystemCatalog::ColType Func_json_overlaps::operationType(FunctionParm& fp
/**
* getBoolVal API definition
*/
bool Func_json_overlaps::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
bool Func_json_overlaps::getBoolVal(Row& row, FunctionParm& fp, bool& /*isNull*/,
CalpontSystemCatalog::ColType& /*type*/)
{
bool isNullJS1 = false, isNullJS2 = false;
const auto js1 = fp[0]->data()->getStrVal(row, isNullJS1);

View File

@ -18,7 +18,6 @@ class QueryJSONPathWrapper : public JSONPathWrapper
{
return je->checkAndGetComplexVal(res, error);
}
};
bool JSONEgWrapper::checkAndGetComplexVal(string& ret, int* error)
@ -43,13 +42,13 @@ bool JSONEgWrapper::checkAndGetComplexVal(string& ret, int* error)
}
CalpontSystemCatalog::ColType Func_json_query::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_query::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
string ret;
QueryJSONPathWrapper qpw;

View File

@ -20,13 +20,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_quote::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
std::string Func_json_quote::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull || !isCharType(fp[0]->data()->resultType().colDataType))

View File

@ -15,13 +15,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_remove::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_remove::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto& js = fp[0]->data()->getStrVal(row, isNull);

View File

@ -54,12 +54,12 @@ namespace funcexp
{
const static int wildOne = '_';
const static int wildMany = '%';
int Func_json_search::cmpJSValWild(json_engine_t* jsEg, const utils::NullString& cmpStr, const CHARSET_INFO* cs)
int Func_json_search::cmpJSValWild(json_engine_t* jsEg, const utils::NullString& cmpStr,
const CHARSET_INFO* cs)
{
if (jsEg->value_type != JSON_VALUE_STRING || !jsEg->value_escaped)
return cs->wildcmp((const char*)jsEg->value, (const char*)(jsEg->value + jsEg->value_len),
(const char*)cmpStr.str(), (const char*)cmpStr.end(), escape,
wildOne, wildMany)
(const char*)cmpStr.str(), (const char*)cmpStr.end(), escape, wildOne, wildMany)
? 0
: 1;
@ -71,21 +71,18 @@ int Func_json_search::cmpJSValWild(json_engine_t* jsEg, const utils::NullString&
(uchar*)buf, (uchar*)(buf + strLen))) <= 0)
return 0;
return cs->wildcmp(buf, buf + strLen, cmpStr.str(), cmpStr.end(), escape, wildOne,
wildMany)
? 0
: 1;
return cs->wildcmp(buf, buf + strLen, cmpStr.str(), cmpStr.end(), escape, wildOne, wildMany) ? 0 : 1;
}
}
CalpontSystemCatalog::ColType Func_json_search::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_search::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
string ret;
bool isNullJS = false, isNullVal = false;

View File

@ -14,13 +14,13 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_type::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
string Func_json_type::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -14,7 +14,7 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_unquote::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}

View File

@ -14,7 +14,7 @@ using namespace funcexp::helpers;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_json_valid::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -23,7 +23,7 @@ CalpontSystemCatalog::ColType Func_json_valid::operationType(FunctionParm& fp,
* getBoolVal API definition
*/
bool Func_json_valid::getBoolVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& type)
CalpontSystemCatalog::ColType& /*type*/)
{
const auto js = fp[0]->data()->getStrVal(row, isNull);
if (isNull)

View File

@ -70,11 +70,11 @@ bool JSONPathWrapper::extract(std::string& ret, rowgroup::Row& row, execplan::SP
int error = 0;
if (json_path_setup(&p, getCharset(funcParamPath), (const uchar*)sjsp.str(),
(const uchar*)sjsp.end()))
if (json_path_setup(&p, getCharset(funcParamPath), (const uchar*)sjsp.str(), (const uchar*)sjsp.end()))
return true;
JSONEgWrapper je(getCharset(funcParamJS), reinterpret_cast<const uchar*>(js.str()), reinterpret_cast<const uchar*>(js.end()));
JSONEgWrapper je(getCharset(funcParamJS), reinterpret_cast<const uchar*>(js.str()),
reinterpret_cast<const uchar*>(js.end()));
currStep = p.steps;
@ -96,7 +96,7 @@ bool JSONPathWrapper::extract(std::string& ret, rowgroup::Row& row, execplan::SP
}
CalpontSystemCatalog::ColType Func_json_value::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
return fp[0]->data()->resultType();
}
@ -115,11 +115,10 @@ class JSONPathWrapperValue : public JSONPathWrapper
{
return je->checkAndGetScalar(res, error);
}
};
string Func_json_value::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
string ret;
JSONPathWrapperValue pw;

View File

@ -37,7 +37,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_last_day::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_last_day::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -37,7 +37,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_lcase::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -41,7 +41,7 @@ using namespace funcexp;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_least::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_least::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
// operation type is not used by this functor
@ -50,7 +50,7 @@ CalpontSystemCatalog::ColType Func_least::operationType(FunctionParm& fp,
}
int64_t Func_least::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
double str = fp[0]->data()->getDoubleVal(row, isNull);
@ -68,7 +68,7 @@ int64_t Func_least::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull
}
double Func_least::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
double str = fp[0]->data()->getDoubleVal(row, isNull);
@ -86,7 +86,7 @@ double Func_least::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNu
}
long double Func_least::getLongDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
long double str = fp[0]->data()->getLongDoubleVal(row, isNull);
@ -104,7 +104,7 @@ long double Func_least::getLongDoubleVal(rowgroup::Row& row, FunctionParm& fp, b
}
std::string Func_least::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
auto leastStr = fp[0]->data()->getStrVal(row, isNull);
CHARSET_INFO* cs = fp[0]->data()->resultType().getCharset();
@ -123,7 +123,7 @@ std::string Func_least::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
IDB_Decimal Func_least::getDecimalVal(Row& row, FunctionParm& fp, bool& isNull,
CalpontSystemCatalog::ColType& ct)
CalpontSystemCatalog::ColType& /*ct*/)
{
IDB_Decimal str = fp[0]->data()->getDecimalVal(row, isNull);
@ -141,7 +141,7 @@ IDB_Decimal Func_least::getDecimalVal(Row& row, FunctionParm& fp, bool& isNull,
}
int32_t Func_least::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int32_t str = fp[0]->data()->getDateIntVal(row, isNull);
@ -159,7 +159,7 @@ int32_t Func_least::getDateIntVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
int64_t Func_least::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t str = fp[0]->data()->getDatetimeIntVal(row, isNull);
@ -177,7 +177,7 @@ int64_t Func_least::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool
}
int64_t Func_least::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t str = fp[0]->data()->getTimestampIntVal(row, isNull);
@ -195,7 +195,7 @@ int64_t Func_least::getTimestampIntVal(rowgroup::Row& row, FunctionParm& fp, boo
}
int64_t Func_least::getTimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// Strip off unused day
int64_t leastStr = fp[0]->data()->getTimeIntVal(row, isNull);

View File

@ -36,7 +36,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_left::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -48,7 +48,7 @@ std::string Func_left::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isN
CHARSET_INFO* cs = type.getCharset();
// The original string
const auto& src = fp[0]->data()->getStrVal(row, isNull);
if (isNull || src.length() < 1) // null or empty string.
if (isNull || src.length() < 1) // null or empty string.
return "";
// binLen represents the number of bytes in src
size_t binLen = src.length();

View File

@ -35,8 +35,8 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_length::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_length::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& /*resultType*/)
{
CalpontSystemCatalog::ColType ct;
ct.colDataType = CalpontSystemCatalog::VARCHAR;

View File

@ -42,7 +42,7 @@ namespace funcexp
const string Func_lpad::fPad = " ";
CalpontSystemCatalog::ColType Func_lpad::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -37,7 +37,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_ltrim::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -37,7 +37,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_ltrim_oracle::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -166,7 +166,7 @@ uint64_t makedate(rowgroup::Row& row, FunctionParm& parm, bool& isNull)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_makedate::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_makedate::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -37,7 +37,7 @@ using namespace dataconvert;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_maketime::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_maketime::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -77,7 +77,7 @@ namespace funcexp
//
CalpontSystemCatalog::ColType Func_acos::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -205,7 +205,7 @@ double Func_acos::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpo
//
CalpontSystemCatalog::ColType Func_asin::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -333,7 +333,7 @@ double Func_asin::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpo
//
CalpontSystemCatalog::ColType Func_atan::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -537,7 +537,7 @@ double Func_atan::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpo
//
CalpontSystemCatalog::ColType Func_cos::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -665,7 +665,7 @@ double Func_cos::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpon
//
CalpontSystemCatalog::ColType Func_cot::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -847,7 +847,7 @@ double Func_cot::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpon
//
CalpontSystemCatalog::ColType Func_log::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -1058,7 +1058,7 @@ double Func_log::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpon
//
CalpontSystemCatalog::ColType Func_log2::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -1191,7 +1191,7 @@ double Func_log2::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpo
//
CalpontSystemCatalog::ColType Func_log10::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -1325,7 +1325,7 @@ double Func_log10::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calp
//
CalpontSystemCatalog::ColType Func_sin::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -1467,7 +1467,7 @@ double Func_sin::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpon
//
CalpontSystemCatalog::ColType Func_sqrt::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -1595,7 +1595,7 @@ double Func_sqrt::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpo
//
CalpontSystemCatalog::ColType Func_tan::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -1723,7 +1723,7 @@ double Func_tan::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Calpon
//
CalpontSystemCatalog::ColType Func_format::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -2033,7 +2033,7 @@ string Func_format::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
//
CalpontSystemCatalog::ColType Func_radians::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -2162,7 +2162,7 @@ double Func_radians::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Ca
//
CalpontSystemCatalog::ColType Func_degrees::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -163,7 +163,6 @@ class md5
uint4 m_Count[2];
uchar m_Buffer[64];
uchar m_Digest[16];
uchar m_Finalized;
};
/////////////////////////////////////////////////////////////////////////
@ -495,14 +494,14 @@ void md5::Decode(uint4* dest, uchar* src, uint4 nLength)
namespace funcexp
{
CalpontSystemCatalog::ColType Func_md5::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
string Func_md5::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
const auto& arg = parm[0]->data()->getStrVal(row, isNull);
if (arg.isNull())
@ -515,4 +514,3 @@ string Func_md5::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp

View File

@ -36,14 +36,14 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_microsecond::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_microsecond::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_microsecond::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t val = 0;
uint32_t microSecond = 0;

View File

@ -35,7 +35,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_minute::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_minute::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -41,14 +41,14 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_mod::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_mod::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
IDB_Decimal Func_mod::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& operationColType)
CalpontSystemCatalog::ColType& /*operationColType*/)
{
if (parm.size() < 2)
{
@ -115,7 +115,7 @@ IDB_Decimal Func_mod::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull,
}
double Func_mod::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& operationColType)
execplan::CalpontSystemCatalog::ColType& /*operationColType*/)
{
if (parm.size() < 2)
{
@ -214,7 +214,7 @@ double Func_mod::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull,
}
long double Func_mod::getLongDoubleVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& operationColType)
CalpontSystemCatalog::ColType& /*operationColType*/)
{
if (parm.size() < 2)
{
@ -313,7 +313,7 @@ long double Func_mod::getLongDoubleVal(Row& row, FunctionParm& parm, bool& isNul
}
int64_t Func_mod::getIntVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& operationColType)
CalpontSystemCatalog::ColType& /*operationColType*/)
{
if (parm.size() < 2)
{
@ -406,7 +406,7 @@ int64_t Func_mod::getIntVal(Row& row, FunctionParm& parm, bool& isNull,
}
uint64_t Func_mod::getUintVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& operationColType)
CalpontSystemCatalog::ColType& /*operationColType*/)
{
if (parm.size() < 2)
{

View File

@ -35,7 +35,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_month::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_month::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -36,7 +36,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_monthname::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_monthname::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
@ -165,9 +165,7 @@ int64_t Func_monthname::getIntValInternal(rowgroup::Row& row, FunctionParm& parm
break;
default:
isNull = true;
return -1;
default: isNull = true; return -1;
}
return -1;
@ -179,8 +177,8 @@ int64_t Func_monthname::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
return getIntValInternal(row, parm, isNull, op_ct);
}
double Func_monthname::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
double Func_monthname::getDoubleVal(rowgroup::Row& /*row*/, FunctionParm& /*parm*/, bool& /*isNull*/,
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
return 0;
}

View File

@ -46,14 +46,14 @@ using namespace funcexp;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_nullif::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_nullif::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_nullif::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t exp1 = parm[0]->data()->getIntVal(row, isNull);
@ -61,10 +61,8 @@ int64_t Func_nullif::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isN
if (isNull)
return exp1;
int64_t exp2 = 0;
switch (parm[1]->data()->resultType().colDataType)
{
case execplan::CalpontSystemCatalog::BIGINT:
@ -240,7 +238,7 @@ int64_t Func_nullif::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isN
}
uint64_t Func_nullif::getUintVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
uint64_t exp1 = parm[0]->data()->getUintVal(row, isNull);
@ -358,7 +356,7 @@ uint64_t Func_nullif::getUintVal(rowgroup::Row& row, FunctionParm& parm, bool& i
}
string Func_nullif::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
string exp1 = parm[0]->data()->getStrVal(row, isNull).safeString("");
@ -409,7 +407,7 @@ string Func_nullif::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNu
}
int32_t Func_nullif::getDateIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t exp1 = parm[0]->data()->getDateIntVal(row, isNull);
@ -501,7 +499,7 @@ int32_t Func_nullif::getDateIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
int64_t Func_nullif::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t exp1 = parm[0]->data()->getDatetimeIntVal(row, isNull);
@ -571,7 +569,7 @@ int64_t Func_nullif::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm, b
}
int64_t Func_nullif::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t exp1 = parm[0]->data()->getTimeIntVal(row, isNull);
@ -627,7 +625,7 @@ int64_t Func_nullif::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
int64_t Func_nullif::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& ct)
execplan::CalpontSystemCatalog::ColType& /*ct*/)
{
int64_t exp1 = parm[0]->data()->getTimestampIntVal(row, isNull);
@ -683,7 +681,7 @@ int64_t Func_nullif::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm,
}
double Func_nullif::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
double exp1 = parm[0]->data()->getDoubleVal(row, isNull);
@ -776,7 +774,7 @@ double Func_nullif::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& i
}
long double Func_nullif::getLongDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
long double exp1 = parm[0]->data()->getLongDoubleVal(row, isNull);
@ -1007,8 +1005,8 @@ execplan::IDB_Decimal Func_nullif::getDecimalVal(rowgroup::Row& row, FunctionPar
string value;
if (parm[1]->data()->resultType().colDataType == execplan::CalpontSystemCatalog::TIMESTAMP)
value =
DataConvert::timestampToString1(parm[1]->data()->getTimestampIntVal(row, isNull), op_ct.getTimeZone());
value = DataConvert::timestampToString1(parm[1]->data()->getTimestampIntVal(row, isNull),
op_ct.getTimeZone());
else
value = DataConvert::datetimeToString1(parm[1]->data()->getDatetimeIntVal(row, isNull));

View File

@ -36,14 +36,14 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_period_add::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_period_add::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_period_add::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
int64_t period = parm[0]->data()->getIntVal(row, isNull);

View File

@ -94,14 +94,14 @@ int64_t getArgSInt64Val(rowgroup::Row& row, TreeNode* exp, bool& isNull)
return 0;
}
CalpontSystemCatalog::ColType Func_period_diff::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_period_diff::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
int64_t Func_period_diff::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
uint64_t period1 = (uint64_t)getArgSInt64Val(row, parm[0]->data(), isNull);

View File

@ -42,7 +42,7 @@ using namespace logging;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_pow::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -36,7 +36,7 @@ using namespace execplan;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_quarter::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_quarter::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -26,14 +26,14 @@ using namespace rowgroup;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_quote::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_quote::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
std::string Func_quote::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
string str;

View File

@ -56,14 +56,14 @@ double Func_rand::getRand()
return (((double)fSeed1) / (double)maxValue);
}
CalpontSystemCatalog::ColType Func_rand::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_rand::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;
}
double Func_rand::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
// NOTE: this function needs to use 32bit ints otherwise it will break for negative values
uint32_t seedParm = 0;

View File

@ -24,8 +24,10 @@
#include <cstdlib>
#include <string>
using namespace std;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "utils/pcre2/jpcre2.hpp"
#pragma GCC diagnostic pop
#include "functor_bool.h"
#include "functor_str.h"
@ -261,28 +263,28 @@ inline RegExpParams getEpressionAndPattern(rowgroup::Row& row, funcexp::Function
namespace funcexp
{
CalpontSystemCatalog::ColType Func_regexp_replace::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_regexp_replace::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
CalpontSystemCatalog::ColType Func_regexp_substr::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
CalpontSystemCatalog::ColType Func_regexp_instr::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
}
CalpontSystemCatalog::ColType Func_regexp::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_regexp::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
return resultType;

View File

@ -38,7 +38,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_repeat::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType Func_repeat::operationType(FunctionParm& /*fp*/,
CalpontSystemCatalog::ColType& resultType)
{
// operation type is not used by this functor
@ -47,7 +47,7 @@ CalpontSystemCatalog::ColType Func_repeat::operationType(FunctionParm& fp,
}
std::string Func_repeat::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isNull,
execplan::CalpontSystemCatalog::ColType& type)
execplan::CalpontSystemCatalog::ColType& /*type*/)
{
string str;

View File

@ -37,7 +37,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_replace::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -78,7 +78,7 @@ std::string Func_replace::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool&
{
// Count the number of fromstr in strend so we can reserve buffer space.
size_t count = 0;
while ( string::npos != (pos = str.find(fromstr, pos)))
while (string::npos != (pos = str.find(fromstr, pos)))
{
++count;
pos += fromLen;

View File

@ -30,8 +30,8 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_replace_oracle::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType Func_replace_oracle::operationType(
FunctionParm& fp, CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();
@ -60,7 +60,7 @@ std::string Func_replace_oracle::getStrVal(rowgroup::Row& row, FunctionParm& fp,
const auto& ntostr = fp[2]->data()->getStrVal(row, isNull);
if (ntostr.isNull())
return "";
const auto& tostr = ntostr.unsafeStringRef();
size_t toLen = tostr.length();

View File

@ -37,7 +37,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_reverse::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -37,7 +37,7 @@ using namespace joblist;
namespace funcexp
{
CalpontSystemCatalog::ColType Func_right::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

View File

@ -419,7 +419,6 @@ IDB_Decimal Func_round::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull
p = nvp;
}
if (d < -datatypes::INT128MAXPRECISION)
{
decimal.s128Value = 0;
@ -749,51 +748,63 @@ string Func_round::getStrVal(Row& row, FunctionParm& parm, bool& isNull, Calpont
}
int64_t Func_round::getDatetimeIntVal(Row& row, FunctionParm& parm, bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
CalpontSystemCatalog::ColType& /*op_ct*/)
{
int32_t s = parm.size() > 1 ? parm[1]->data()->getIntVal(row, isNull) : 0;
if (isNull)
return 0;
s = (s > MAX_MICROSECOND_PRECISION) ? MAX_MICROSECOND_PRECISION : s;
if (s < 0)
if (s < 0)
{
s = 0;
}
int64_t x = parm[0]->data()->getDatetimeIntVal(row, isNull) + (s <= MAX_MICROSECOND_PRECISION - 1 ? 5 * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s - 1] : 0) + (s == 0 ? 48576 : 0); // 48576 = 0xfffff - 1000000;
int64_t x =
parm[0]->data()->getDatetimeIntVal(row, isNull) +
(s <= MAX_MICROSECOND_PRECISION - 1 ? 5 * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s - 1] : 0) +
(s == 0 ? 48576 : 0); // 48576 = 0xfffff - 1000000;
int32_t m_x = x & 0xfffff;
return (x ^ m_x) | (m_x / helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s] * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s]);
return (x ^ m_x) | (m_x / helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s] *
helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s]);
}
int64_t Func_round::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int32_t s = parm.size() > 1 ? parm[1]->data()->getIntVal(row, isNull) : 0;
if (isNull)
return 0;
s = (s > MAX_MICROSECOND_PRECISION) ? MAX_MICROSECOND_PRECISION : s;
if (s < 0)
if (s < 0)
{
s = 0;
}
int64_t x = parm[0]->data()->getTimestampIntVal(row, isNull) + (s <= MAX_MICROSECOND_PRECISION - 1 ? 5 * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s - 1] : 0) + (s == 0 ? 48576 : 0); // 48576 = 0xfffff - 1000000;
int64_t x =
parm[0]->data()->getTimestampIntVal(row, isNull) +
(s <= MAX_MICROSECOND_PRECISION - 1 ? 5 * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s - 1] : 0) +
(s == 0 ? 48576 : 0); // 48576 = 0xfffff - 1000000;
int32_t m_x = x & 0xfffff;
return (x ^ m_x) | (m_x / helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s] * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s]);
return (x ^ m_x) | (m_x / helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s] *
helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s]);
}
int64_t Func_round::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct)
execplan::CalpontSystemCatalog::ColType& /*op_ct*/)
{
int32_t s = parm.size() > 1 ? parm[1]->data()->getIntVal(row, isNull) : 0;
if (isNull)
return 0;
s = (s > MAX_MICROSECOND_PRECISION) ? MAX_MICROSECOND_PRECISION : s;
if (s < 0)
if (s < 0)
{
s = 0;
}
int64_t x = parm[0]->data()->getTimeIntVal(row, isNull) + (s <= MAX_MICROSECOND_PRECISION - 1 ? 5 * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - 1 - s] : 0) + (s == 0 ? 15777215 : 0); // 15777215 = 0xffffff - 1000000;
int64_t x =
parm[0]->data()->getTimeIntVal(row, isNull) +
(s <= MAX_MICROSECOND_PRECISION - 1 ? 5 * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - 1 - s] : 0) +
(s == 0 ? 15777215 : 0); // 15777215 = 0xffffff - 1000000;
int32_t m_x = x & 0xffffff;
return (x ^ m_x) | (m_x / helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s] * helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s]);
return (x ^ m_x) | (m_x / helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s] *
helpers::powerOf10_c[MAX_MICROSECOND_PRECISION - s]);
}
} // namespace funcexp

View File

@ -41,7 +41,7 @@ namespace funcexp
const string Func_rpad::fPad = " ";
CalpontSystemCatalog::ColType Func_rpad::operationType(FunctionParm& fp,
CalpontSystemCatalog::ColType& resultType)
CalpontSystemCatalog::ColType& /*resultType*/)
{
// operation type is not used by this functor
return fp[0]->data()->resultType();

Some files were not shown because too many files have changed in this diff Show More