You've already forked mariadb-columnstore-engine
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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user