1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-641 Fix alter table add wide decimal column.

This patch also removes CalpontSystemCatalog::BINARY and
ddlpackage::DDL_BINARY that were added during the initial
stages of the work on MCOL-641.
This commit is contained in:
Gagan Goel
2020-11-20 18:23:54 -05:00
parent ba4156fe13
commit 995cadef2d
32 changed files with 62 additions and 255 deletions

View File

@ -510,16 +510,6 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string& err
throw std::runtime_error(os.str());
}
else if (dataType == CalpontSystemCatalog::BINARY
&& ! (colDefPtr->fType->fLength == 16
|| colDefPtr->fType->fLength == 32))
{
ostringstream os;
os << "binary length may not be other than 16 or 32";
throw std::runtime_error(os.str());
}
unsigned int i = 0;
column_iterator = columns.begin();
@ -871,10 +861,10 @@ uint8_t WE_DDLCommandProc::writeSyscolumn(ByteStream& bs, std::string& err)
if (dataType == CalpontSystemCatalog::DECIMAL ||
dataType == CalpontSystemCatalog::UDECIMAL)
{
if (colDefPtr->fType->fPrecision > 18) //@Bug 5717 precision cannot be over 18.
if (colDefPtr->fType->fPrecision > 38) //@Bug 5717 precision cannot be over 38.
{
ostringstream os;
os << "Syntax error: The maximum precision (total number of digits) that can be specified is 18";
os << "Syntax error: The maximum precision (total number of digits) that can be specified is 38";
throw std::runtime_error(os.str());
}
else if (colDefPtr->fType->fPrecision < colDefPtr->fType->fScale)

View File

@ -263,10 +263,6 @@ inline int convertDataType(int dataType)
calpontDataType = execplan::CalpontSystemCatalog::UDOUBLE;
break;
case ddlpackage::DDL_BINARY:
calpontDataType = execplan::CalpontSystemCatalog::BINARY;
break;
default:
throw runtime_error("Unsupported datatype!");