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

MCOL-267 multi-block support for PrimProc and bulk

* Adds multi-block bulk write support
* Adds PrimProc multi-block read support
* Allows the functions length() and hex() to work with BLOB columns
This commit is contained in:
Andrew Hutchings
2017-03-20 18:32:24 +00:00
parent aea729fe7d
commit 093aa377e5
16 changed files with 186 additions and 34 deletions

View File

@ -394,6 +394,7 @@ inline bool TreeNode::getBoolVal()
return (atoi(fResult.strVal.c_str()) != 0);
//FIXME: Huh???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
if (fResultType.colWidth <= 7)
return (atoi((char*)(&fResult.origIntVal)) != 0);
return (atoi(fResult.strVal.c_str()) != 0);
@ -440,6 +441,7 @@ inline const std::string& TreeNode::getStrVal()
break;
//FIXME: ???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
if (fResultType.colWidth <= 7)
fResult.strVal = (char*)(&fResult.origIntVal);
break;
@ -573,6 +575,7 @@ inline int64_t TreeNode::getIntVal()
return atoll(fResult.strVal.c_str());
//FIXME: ???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
if (fResultType.colWidth <= 7)
return fResult.intVal;
return atoll(fResult.strVal.c_str());
@ -656,6 +659,7 @@ inline float TreeNode::getFloatVal()
return atof(fResult.strVal.c_str());
//FIXME: ???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
if (fResultType.colWidth <= 7)
return atof((char*)(&fResult.origIntVal));
return atof(fResult.strVal.c_str());
@ -703,6 +707,7 @@ inline double TreeNode::getDoubleVal()
return strtod(fResult.strVal.c_str(), NULL);
//FIXME: ???
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
if (fResultType.colWidth <= 7)
return strtod((char*)(&fResult.origIntVal), NULL);
return strtod(fResult.strVal.c_str(), NULL);
@ -746,6 +751,7 @@ inline IDB_Decimal TreeNode::getDecimalVal()
case CalpontSystemCatalog::VARCHAR:
throw logging::InvalidConversionExcept("TreeNode::getDecimalVal: non-support conversion from string");
case CalpontSystemCatalog::VARBINARY:
case CalpontSystemCatalog::BLOB:
throw logging::InvalidConversionExcept("TreeNode::getDecimalVal: non-support conversion from binary string");
case CalpontSystemCatalog::BIGINT:
case CalpontSystemCatalog::MEDINT: