1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-641 atoi128 now correctly processes decimal point and - signs.

There are multiple overloaded version of the low level DML write methods to
push down CSC column type. WE needs the type to convert values correctly.

Replaced WE_INT128 with CSC data type that is more informative.

Removed commented and obsolete code.

Replaced switch-case blocks with oneliners.
This commit is contained in:
drrtuy
2020-01-12 15:11:31 +03:00
committed by Roman Nozdrin
parent 49a5573418
commit 0c67b6ab50
8 changed files with 1475 additions and 362 deletions

View File

@@ -1603,12 +1603,13 @@ bool optimizeIdbPatitionSimpleFilter(SimpleFilter* sf, JobStepVector& jsv, JobIn
// WIP MCOL-641 put this in dataconvert
void atoi_(const string &arg, unsigned __int128 &res)
void atoi128(const string& arg, unsigned __int128& res)
{
res = 0;
for (size_t j = 0; j < arg.size(); j++)
{
res = res*10 + arg[j] - '0';
if (LIKELY(arg[j]-'0' >= 0))
res = res*10 + arg[j] - '0';
}
}
@@ -1902,7 +1903,7 @@ const JobStepVector doSimpleFilter(SimpleFilter* sf, JobInfo& jobInfo)
if (ct.colDataType == CalpontSystemCatalog::DECIMAL &&
ct.colWidth == 16)
{
atoi_(constval, val128);
atoi128(constval, val128);
}
else
{