1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-24 14:20:59 +03:00

MCOL-973 Fix DOUBLE typecast crash

DOUBLE typecast was not supported and the failure detection caused a
crash.

This patch adds support for DOUBLE typecast and fixes the crash caused
when a non-supported function is detected as part of an arithmatic.
This commit is contained in:
Andrew Hutchings
2017-10-20 12:38:11 +03:00
parent cb9714bd90
commit 5911e677fa
4 changed files with 143 additions and 2 deletions

View File

@@ -303,6 +303,31 @@ public:
execplan::CalpontSystemCatalog::ColType& op_ct);
};
/** @brief Func_cast_double class
*/
class Func_cast_double : public Func_Real
{
public:
Func_cast_double() : Func_Real("cast_double") {}
virtual ~Func_cast_double() {}
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
int64_t getIntVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
double getDoubleVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
std::string getStrVal(rowgroup::Row& row,
FunctionParm& fp,
bool& isNull,
execplan::CalpontSystemCatalog::ColType& op_ct);
};
/** @brief Func_mod class
*/