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
Feature/mcol 4882 cpimport skip rows (#3594)
* feat(cpimport): MCOL-4882 add a parameter to skip header rows * chore(cpimport): MCOL-4882 Use boost::program_options to arguments parsing * feat(cpimport.bin): MCOL-4882 Add missing changes * add test * fix clang * add missing cmdline argument * fix bug * Fix double lines skipping * Fix incorrect --silent (-N) parsing * fix default --max-errors processing * fix overwriting default username * move initialization to members declaration
This commit is contained in:
committed by
GitHub
parent
1c8d5ec04e
commit
78c1b5034d
@ -130,6 +130,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;
|
||||
@ -223,7 +224,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 +318,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 +436,12 @@ void XMLJob::setJobData(xmlNode* pNode, const xmlTag tag, bool bExpectContent, X
|
||||
break;
|
||||
}
|
||||
|
||||
case TAG_SKIP_ROWS:
|
||||
{
|
||||
fJob.fSkipRows = intVal;
|
||||
break;
|
||||
}
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user