1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-664 Add function support for TEXT

For the initial BLOB/TEXT pull request we put them in the same bucket as
VARBINARY, forcing many functions to be disabled. This patch enables the
same TEXT function support as VARCHAR.
This commit is contained in:
Andrew Hutchings
2017-04-15 07:22:05 +02:00
parent dce4b11437
commit 28fe2c0b70
53 changed files with 109 additions and 16 deletions

View File

@ -134,6 +134,7 @@ int64_t Func_cast_signed::getIntVal(Row& row,
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
const string& value = parm[0]->data()->getStrVal(row, isNull);
if (isNull)
@ -243,6 +244,7 @@ uint64_t Func_cast_unsigned::getUintVal(Row& row,
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
const string& value = parm[0]->data()->getStrVal(row, isNull);
if (isNull)
@ -358,6 +360,7 @@ string Func_cast_char::getStrVal(Row& row,
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
const string& value = parm[0]->data()->getStrVal(row, isNull);
if (isNull)
@ -519,6 +522,7 @@ int32_t Func_cast_date::getDateIntVal(rowgroup::Row& row,
}
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
val = dataconvert::DataConvert::stringToDate(parm[0]->data()->getStrVal(row, isNull));
if (val == -1)
@ -588,6 +592,7 @@ int64_t Func_cast_date::getDatetimeIntVal(rowgroup::Row& row,
}
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
val = dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull));
if (val == -1)
@ -716,6 +721,7 @@ int64_t Func_cast_datetime::getDatetimeIntVal(rowgroup::Row& row,
}
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
val = dataconvert::DataConvert::stringToDatetime(parm[0]->data()->getStrVal(row, isNull));
if (val == -1)
@ -893,6 +899,7 @@ IDB_Decimal Func_cast_decimal::getDecimalVal(Row& row,
case execplan::CalpontSystemCatalog::VARCHAR:
case execplan::CalpontSystemCatalog::CHAR:
case execplan::CalpontSystemCatalog::TEXT:
{
const string& strValue = parm[0]->data()->getStrVal(row, isNull);
const char* str = strValue.c_str();