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

MCOL-1178 Add bool processing to CASE

This commit is contained in:
David Hall
2018-02-02 15:30:12 -06:00
parent 446cf74a68
commit 30b4edb0cd
2 changed files with 36 additions and 0 deletions

View File

@ -343,6 +343,20 @@ CalpontSystemCatalog::ColType Func_simple_case::operationType(FunctionParm& fp,
}
bool Func_simple_case::getBoolVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType& operationColType)
{
uint64_t i = simple_case_cmp(row, parm, isNull, operationColType);
if (isNull)
return joblist::BIGINTNULL;
return parm[i+1]->data()->getBoolVal(row, isNull);
}
int64_t Func_simple_case::getIntVal(Row& row,
FunctionParm& parm,
bool& isNull,
@ -446,6 +460,18 @@ CalpontSystemCatalog::ColType Func_searched_case::operationType(FunctionParm& fp
return caseOperationType(fp, resultType, false);
}
bool Func_searched_case::getBoolVal(Row& row,
FunctionParm& parm,
bool& isNull,
CalpontSystemCatalog::ColType&)
{
uint64_t i = searched_case_cmp(row, parm, isNull);
if (isNull)
return joblist::BIGINTNULL;
return parm[i+1]->data()->getBoolVal(row, isNull);
}
int64_t Func_searched_case::getIntVal(Row& row,
FunctionParm& parm,

View File

@ -70,6 +70,11 @@ public:
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
int64_t getIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
@ -112,6 +117,11 @@ public:
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
bool getBoolVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
int64_t getIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,