You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Merge branch 'stable-23.10' into MCOL-4240
This commit is contained in:
@ -49,9 +49,7 @@ namespace WriteEngine
|
||||
// Constructor
|
||||
//------------------------------------------------------------------------------
|
||||
XMLJob::XMLJob()
|
||||
: fDeleteTempFile(false)
|
||||
, fValidateColList(true)
|
||||
, fTimeZone(dataconvert::systemTimeZoneOffset())
|
||||
: fDeleteTempFile(false), fValidateColList(true), fTimeZone(dataconvert::systemTimeZoneOffset())
|
||||
{
|
||||
}
|
||||
|
||||
@ -130,6 +128,7 @@ void XMLJob::printJobInfo(Log& logger) const
|
||||
oss1 << "Read Buffers: " << job.numberOfReadBuffers << endl;
|
||||
oss1 << "Read Buffer Size: " << job.readBufferSize << endl;
|
||||
oss1 << "setvbuf Size: " << job.writeBufferSize << endl;
|
||||
oss1 << "Header rows : " << job.fSkipRows << endl;
|
||||
oss1 << "Create Date : " << job.createDate << endl;
|
||||
oss1 << "Create Time : " << job.createTime << endl;
|
||||
oss1 << "Schema Name : " << job.schema << endl;
|
||||
@ -196,7 +195,7 @@ void XMLJob::printJobInfo(Log& logger) const
|
||||
|
||||
logger.logMsg(oss3.str(), MSGLVL_INFO2);
|
||||
} // end of loop through columns in a table
|
||||
} // end of loop through tables
|
||||
} // end of loop through tables
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -223,7 +222,8 @@ void XMLJob::printJobInfoBrief(Log& logger) const
|
||||
oss1 << "n/a";
|
||||
|
||||
oss1 << "); ReadBufs(" << job.numberOfReadBuffers << "); ReadBufSize(" << job.readBufferSize
|
||||
<< "); setvbufSize(" << job.writeBufferSize << ')';
|
||||
<< "); setvbufSize(" << job.writeBufferSize << "); "
|
||||
<< "SkipRows(" << job.fSkipRows << ")";
|
||||
logger.logMsg(oss1.str(), MSGLVL_INFO2);
|
||||
|
||||
for (unsigned int i = 0; i < job.jobTableList.size(); i++)
|
||||
@ -316,6 +316,8 @@ bool XMLJob::processNode(xmlNode* pNode)
|
||||
setJobData(pNode, TAG_ENCLOSED_BY_CHAR, true, TYPE_CHAR);
|
||||
else if (isTag(pNode, TAG_ESCAPE_CHAR))
|
||||
setJobData(pNode, TAG_ESCAPE_CHAR, true, TYPE_CHAR);
|
||||
else if (isTag(pNode, TAG_SKIP_ROWS))
|
||||
setJobData(pNode, TAG_SKIP_ROWS, true, TYPE_INT);
|
||||
else
|
||||
{
|
||||
ostringstream oss;
|
||||
@ -432,6 +434,12 @@ void XMLJob::setJobData(xmlNode* pNode, const xmlTag tag, bool bExpectContent, X
|
||||
break;
|
||||
}
|
||||
|
||||
case TAG_SKIP_ROWS:
|
||||
{
|
||||
fJob.fSkipRows = intVal;
|
||||
break;
|
||||
}
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@ -463,8 +471,13 @@ void XMLJob::setJobDataTable(xmlNode* pNode)
|
||||
if (getNodeAttributeStr(pNode, xmlTagTable[TAG_LOAD_NAME], bufString))
|
||||
curTable.loadFileName = bufString;
|
||||
|
||||
if (getNodeAttribute(pNode, xmlTagTable[TAG_MAX_ERR_ROW], &intVal, TYPE_INT))
|
||||
curTable.maxErrNum = intVal;
|
||||
if (getNodeAttributeStr(pNode, xmlTagTable[TAG_MAX_ERR_ROW], bufString))
|
||||
{
|
||||
if (bufString == "all")
|
||||
curTable.maxErrNum = MAX_ERRORS_ALL;
|
||||
else
|
||||
curTable.maxErrNum = atoi(bufString.c_str());
|
||||
}
|
||||
|
||||
fJob.jobTableList.push_back(curTable);
|
||||
}
|
||||
@ -673,7 +686,6 @@ void XMLJob::initSatLimits(JobColumn& curColumn) const
|
||||
{
|
||||
curColumn.fMaxIntSat = dataconvert::decimalRangeUp<int128_t>(curColumn.precision);
|
||||
curColumn.fMinIntSat = -curColumn.fMaxIntSat;
|
||||
|
||||
}
|
||||
else if (curColumn.typeName == ColDataTypeStr[CalpontSystemCatalog::UDECIMAL])
|
||||
{
|
||||
@ -977,12 +989,13 @@ void XMLJob::fillInXMLDataNotNullDefault(const std::string& fullTblName,
|
||||
{
|
||||
if (LIKELY(colType.colWidth == datatypes::MAXDECIMALWIDTH))
|
||||
{
|
||||
col.fDefaultWideDecimal = colType.decimal128FromString(col_defaultValue.safeString(), &bDefaultConvertError);
|
||||
col.fDefaultWideDecimal =
|
||||
colType.decimal128FromString(col_defaultValue.safeString(), &bDefaultConvertError);
|
||||
}
|
||||
else
|
||||
{
|
||||
col.fDefaultInt = Convertor::convertDecimalString(col_defaultValue.str(),
|
||||
col_defaultValue.length(), colType.scale);
|
||||
col.fDefaultInt = Convertor::convertDecimalString(col_defaultValue.str(), col_defaultValue.length(),
|
||||
colType.scale);
|
||||
|
||||
if (errno == ERANGE)
|
||||
bDefaultConvertError = true;
|
||||
@ -994,9 +1007,8 @@ void XMLJob::fillInXMLDataNotNullDefault(const std::string& fullTblName,
|
||||
case execplan::CalpontSystemCatalog::DATE:
|
||||
{
|
||||
int convertStatus;
|
||||
int32_t dt = dataconvert::DataConvert::convertColumnDate(col_defaultValue.str(),
|
||||
dataconvert::CALPONTDATE_ENUM, convertStatus,
|
||||
col_defaultValue.length());
|
||||
int32_t dt = dataconvert::DataConvert::convertColumnDate(
|
||||
col_defaultValue.str(), dataconvert::CALPONTDATE_ENUM, convertStatus, col_defaultValue.length());
|
||||
|
||||
if (convertStatus != 0)
|
||||
bDefaultConvertError = true;
|
||||
@ -1036,9 +1048,8 @@ void XMLJob::fillInXMLDataNotNullDefault(const std::string& fullTblName,
|
||||
case execplan::CalpontSystemCatalog::TIME:
|
||||
{
|
||||
int convertStatus;
|
||||
int64_t dt = dataconvert::DataConvert::convertColumnTime(col_defaultValue.str(),
|
||||
dataconvert::CALPONTTIME_ENUM, convertStatus,
|
||||
col_defaultValue.length());
|
||||
int64_t dt = dataconvert::DataConvert::convertColumnTime(
|
||||
col_defaultValue.str(), dataconvert::CALPONTTIME_ENUM, convertStatus, col_defaultValue.length());
|
||||
|
||||
if (convertStatus != 0)
|
||||
bDefaultConvertError = true;
|
||||
|
Reference in New Issue
Block a user