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

Merge pull request #1677 from tntnatbry/MCOL-4177-2

MCOL-4177 Add support for bulk insertion for wide decimals.
This commit is contained in:
Roman Nozdrin
2020-12-18 12:37:23 +03:00
committed by GitHub
9 changed files with 205 additions and 299 deletions

View File

@ -57,7 +57,9 @@ using namespace dataconvert;
namespace datatypes
{
int128_t SystemCatalog::TypeAttributesStd::decimal128FromString(const std::string& value) const
int128_t
SystemCatalog::TypeAttributesStd::decimal128FromString(
const std::string& value, bool *saturate) const
{
int128_t result = 0;
bool pushWarning = false;
@ -67,7 +69,8 @@ int128_t SystemCatalog::TypeAttributesStd::decimal128FromString(const std::strin
*this,
pushWarning,
noRoundup,
result);
result,
saturate);
return result;
}

View File

@ -167,10 +167,15 @@ public:
scale(0),
precision(-1)
{}
TypeAttributesStd(int32_t w, int32_t s, int32_t p)
:colWidth(w),
scale(s),
precision(p)
{}
/**
@brief Convenience method to get int128 from a std::string.
*/
int128_t decimal128FromString(const std::string& value) const;
int128_t decimal128FromString(const std::string& value, bool *saturate = 0) const;
/**
@brief The method sets the legacy scale and precision of a wide decimal