1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -29,9 +29,8 @@ using namespace boost;
namespace tpch
{
RF2::RF2(const string& sn, uint32_t sid, uint32_t tflg, int c, int p, bool d, bool v) :
fSchema(sn), fSessionID(sid), fTflg(tflg), fIntvl(c), fPack(p), fDflg(d), fVflg(v)
RF2::RF2(const string& sn, uint32_t sid, uint32_t tflg, int c, int p, bool d, bool v)
: fSchema(sn), fSessionID(sid), fTflg(tflg), fIntvl(c), fPack(p), fDflg(d), fVflg(v)
{
}
@ -41,47 +40,47 @@ RF2::~RF2()
int RF2::run(istream& in)
{
const streamsize ilinelen = 1024;
scoped_array<char> iline(new char[ilinelen]);
int cnt = 0;
dmlif::DMLIF dmlif(fSessionID, fTflg, fDflg, fVflg);
const streamsize ilinelen = 1024;
scoped_array<char> iline(new char[ilinelen]);
int cnt = 0;
dmlif::DMLIF dmlif(fSessionID, fTflg, fDflg, fVflg);
for (;;)
for (;;)
{
dmlif.rf2Start(fSchema);
for (int i = 0; i < fPack; i++)
{
dmlif.rf2Start(fSchema);
in.getline(iline.get(), ilinelen);
for (int i = 0; i < fPack; i++)
{
in.getline(iline.get(), ilinelen);
if (in.eof())
break;
if (in.eof())
break;
typedef char_separator<char> cs;
typedef tokenizer<cs> tk;
cs sep("|");
tk tok(string(iline.get()), sep);
tk::iterator iter = tok.begin();
idbassert(iter != tok.end());
string keystr = *iter;
++iter;
//idbassert(iter == tok.end());
int64_t okey = strtol(keystr.c_str(), 0, 0);
dmlif.rf2Add(okey);
}
dmlif.rf2Send();
cnt++;
if ((cnt % fIntvl) == 0)
dmlif.sendOne("COMMIT;");
if (in.eof())
break;
typedef char_separator<char> cs;
typedef tokenizer<cs> tk;
cs sep("|");
tk tok(string(iline.get()), sep);
tk::iterator iter = tok.begin();
idbassert(iter != tok.end());
string keystr = *iter;
++iter;
// idbassert(iter == tok.end());
int64_t okey = strtol(keystr.c_str(), 0, 0);
dmlif.rf2Add(okey);
}
dmlif.sendOne("COMMIT;");
return 0;
dmlif.rf2Send();
cnt++;
if ((cnt % fIntvl) == 0)
dmlif.sendOne("COMMIT;");
if (in.eof())
break;
}
dmlif.sendOne("COMMIT;");
return 0;
}
}
} // namespace tpch