|
We have at least two implementations of string-to-decimal conversion:
- dataconvert::number_int_value(), which is used either directly or inside the wrapper SystemCatalog::TypeAttributesStd::decimal128FromString().
- Func_cast_decimal::getDecimalVal()
These two implementations have a lot of duplicate code and have problems:
MCOL-4462 - This problem existed for a long time
MCOL-4500 - This problem was introduced by MCOL-4464
MCOL-4532 - Introduced by MCOL-641
- They use a lot of std::string objects copying and padding, which is not performance friendly.
Under terms of this task we'll do the following:
Further steps
Note, after these changes, the functions dataconvert::number_int_value() and SystemCatalog::TypeAttributesStd::decimal128FromString() will still exist.
Later, under terms of a separate tasks (or even multiple tasks), we'll:
- Replace all remaining calls for dataconvert::number_int_value() to the new functionality.
- Replace all remaining calls for SystemCatalog::TypeAttributesStd::decimal128FromString() to the new functionality.
- Remove dataconvert::number_int_value() and SystemCatalog::TypeAttributesStd::decimal128FromString() completely.
|