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-4177 Add support for bulk insertion for wide decimals.
1. This patch adds support for wide decimals with/without scale to cpimport. In addition, INSERT ... SELECT and LDI are also now supported. 2. Logic to compute the number of bytes to convert a binary representation in the buffer to a narrow decimal is also simplified.
This commit is contained in:
@@ -1087,13 +1087,21 @@ void XMLJob::fillInXMLDataNotNullDefault(
|
||||
case execplan::CalpontSystemCatalog::DECIMAL:
|
||||
case execplan::CalpontSystemCatalog::UDECIMAL:
|
||||
{
|
||||
col.fDefaultInt = Convertor::convertDecimalString(
|
||||
col_defaultValue.c_str(),
|
||||
col_defaultValue.length(),
|
||||
colType.scale);
|
||||
if (LIKELY(colType.colWidth == datatypes::MAXDECIMALWIDTH))
|
||||
{
|
||||
col.fDefaultWideDecimal = colType.decimal128FromString(
|
||||
col_defaultValue, &bDefaultConvertError);
|
||||
}
|
||||
else
|
||||
{
|
||||
col.fDefaultInt = Convertor::convertDecimalString(
|
||||
col_defaultValue.c_str(),
|
||||
col_defaultValue.length(),
|
||||
colType.scale);
|
||||
|
||||
if (errno == ERANGE)
|
||||
bDefaultConvertError = true;
|
||||
if (errno == ERANGE)
|
||||
bDefaultConvertError = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user