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

MCOL-641 PoC version for DECIMAL(38) using BINARY as a basis.

This commit is contained in:
Roman Nozdrin
2019-10-29 01:21:17 -05:00
parent 32f6167067
commit c9f42fb5cc
16 changed files with 70 additions and 40 deletions

View File

@ -458,9 +458,11 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string& err
{
if (colDefPtr->fType->fPrecision > 18) //@Bug 5717 precision cannot be over 18.
{
ostringstream os;
os << "Syntax error: The maximum precision (total number of digits) that can be specified is 18";
throw std::runtime_error(os.str());
// WIP MCOL-641
//ostringstream os;
//os << "Syntax error: The maximum precision (total number of digits) that can be specified is 18";
//throw std::runtime_error(os.str());
colDefPtr->convertDecimal();
}
else if (colDefPtr->fType->fPrecision < colDefPtr->fType->fScale)
{
@ -507,7 +509,7 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string& err
}
else if (dataType == CalpontSystemCatalog::BINARY
&& ! (colDefPtr->fType->fLength == 16
&& ! (colDefPtr->fType->fLength == 16
|| colDefPtr->fType->fLength == 32))
{
ostringstream os;

View File

@ -412,8 +412,8 @@ uint8_t WE_DMLCommandProc::processSingleInsert(messageqcpp::ByteStream& bs, std:
// call the write engine to write the rows
int error = NO_ERROR;
//fWriteEngine.setDebugLevel(WriteEngine::DEBUG_3);
//cout << "inserting a row with transaction id " << txnid.id << endl;
fWEWrapper.setDebugLevel(WriteEngine::DEBUG_3);
cout << "inserting a row with transaction id " << txnid.id << endl;
fWEWrapper.setIsInsert(true);
fWEWrapper.setBulkFlag(true);
fWEWrapper.setTransId(txnid.id);

View File

@ -106,12 +106,12 @@ private:
WriteEngineWrapper fWEWrapper;
boost::scoped_ptr<RBMetaWriter> fRBMetaWriter;
std::vector<boost::shared_ptr<DBRootExtentTracker> > dbRootExtTrackerVec;
inline bool isDictCol ( execplan::CalpontSystemCatalog::ColType colType )
inline bool isDictCol ( execplan::CalpontSystemCatalog::ColType &colType )
{
if (((colType.colDataType == execplan::CalpontSystemCatalog::CHAR) && (colType.colWidth > 8))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::VARCHAR) && (colType.colWidth > 7))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::DECIMAL) && (colType.precision > 18))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::UDECIMAL) && (colType.precision > 18))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::DECIMAL) && (colType.precision > 65))
|| ((colType.colDataType == execplan::CalpontSystemCatalog::UDECIMAL) && (colType.precision > 65))
|| (colType.colDataType == execplan::CalpontSystemCatalog::VARBINARY)
|| (colType.colDataType == execplan::CalpontSystemCatalog::BLOB)
|| (colType.colDataType == execplan::CalpontSystemCatalog::TEXT))