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

MCOL-4652 Fixes for wide-decimal support in bulk insert operations

Previously cpimport didn't send wide min/max-es talking to BRM
This commit is contained in:
Sergey Zefirov
2021-03-31 17:12:19 +03:00
committed by Roman Nozdrin
parent 646ffb6f95
commit 04d5b55c37
4 changed files with 101 additions and 25 deletions

View File

@ -313,26 +313,6 @@ bool WEBrmUpdater::prepareCasualPartitionInfo()
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.max = boost::lexical_cast<int64_t>(pTok);
else
{
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad MAX in CP entry string"));
}
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.min = boost::lexical_cast<int64_t>(pTok);
else
{
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad MIN in CP entry string"));
}
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.seqNum = atoi(pTok);
else
@ -360,6 +340,57 @@ bool WEBrmUpdater::prepareCasualPartitionInfo()
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad column width in CP entry string"));
}
if (datatypes::isWideDecimalType(cpInfoMerge.type, cpInfoMerge.colWidth))
{
datatypes::SystemCatalog::TypeAttributesStd tyAttr(cpInfoMerge.colWidth,
0,
datatypes::INT128MAXPRECISION);
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.bigMax = tyAttr.decimal128FromString(std::string(pTok), NULL);
else
{
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad MAX in CP entry string"));
}
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.bigMin = tyAttr.decimal128FromString(std::string(pTok), NULL);
else
{
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad MIN in CP entry string"));
}
}
else
{
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.max = boost::lexical_cast<int64_t>(pTok);
else
{
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad MAX in CP entry string"));
}
pTok = strtok(NULL, " ");
if (pTok)
cpInfoMerge.min = boost::lexical_cast<int64_t>(pTok);
else
{
//cout << "CP Entry : " << aEntry << endl;
throw (runtime_error("Bad MIN in CP entry string"));
}
}
pTok = strtok(NULL, " ");
if (pTok)