You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-5021 Code changes based on review feedback.
This commit is contained in:
@ -274,9 +274,8 @@ keepGoing:
|
||||
cout << fTxnid.id << " Create table allocOIDs got the starting oid " << fStartingColOID << endl;
|
||||
#endif
|
||||
|
||||
uint32_t size = numColumns + numDictCols;
|
||||
idbassert(size > 0);
|
||||
size += 1; // MCOL-5021
|
||||
uint32_t numColumnOids = numColumns + numDictCols;
|
||||
numColumnOids += 1; // MCOL-5021
|
||||
|
||||
if (fStartingColOID < 0)
|
||||
{
|
||||
@ -300,7 +299,7 @@ keepGoing:
|
||||
bytestream << (uint32_t)createTableStmt.fSessionID;
|
||||
bytestream << (uint32_t)txnID.id;
|
||||
bytestream << (uint32_t)fStartingColOID;
|
||||
bytestream << (uint32_t)(fStartingColOID + size);
|
||||
bytestream << (uint32_t)(fStartingColOID + numColumnOids);
|
||||
bytestream << (uint32_t)createTableStmt.fTableWithAutoi;
|
||||
uint16_t dbRoot;
|
||||
BRM::OID_t sysOid = 1001;
|
||||
@ -543,7 +542,7 @@ keepGoing:
|
||||
bytestream << (ByteStream::byte)WE_SVR_WRITE_CREATETABLEFILES;
|
||||
bytestream << uniqueId;
|
||||
bytestream << (uint32_t)txnID.id;
|
||||
bytestream << size;
|
||||
bytestream << numColumnOids;
|
||||
unsigned colNum = 0;
|
||||
unsigned dictNum = 0;
|
||||
|
||||
@ -607,7 +606,7 @@ keepGoing:
|
||||
++iter;
|
||||
}
|
||||
|
||||
bytestream << (fStartingColOID + size);
|
||||
bytestream << (fStartingColOID + numColumnOids);
|
||||
bytestream << (uint8_t)execplan::AUX_COL_DATATYPE;
|
||||
bytestream << (uint8_t) false;
|
||||
bytestream << (uint32_t)execplan::AUX_COL_WIDTH;
|
||||
@ -630,7 +629,7 @@ keepGoing:
|
||||
}
|
||||
|
||||
// MCOL-5021
|
||||
oidList.push_back(fStartingColOID + size);
|
||||
oidList.push_back(fStartingColOID + numColumnOids);
|
||||
|
||||
try
|
||||
{
|
||||
@ -699,9 +698,9 @@ keepGoing:
|
||||
bytestream.restart();
|
||||
bytestream << (ByteStream::byte)WE_SVR_WRITE_DROPFILES;
|
||||
bytestream << uniqueId;
|
||||
bytestream << (uint32_t)size;
|
||||
bytestream << (uint32_t)numColumnOids;
|
||||
|
||||
for (unsigned i = 0; i < size; i++)
|
||||
for (unsigned i = 0; i < numColumnOids; i++)
|
||||
{
|
||||
bytestream << (uint32_t)(fStartingColOID + i + 1);
|
||||
}
|
||||
|
@ -3662,20 +3662,23 @@ CalpontSystemCatalog::OID CalpontSystemCatalog::tableAUXColumnOID(const TableNam
|
||||
CalpontSelectExecutionPlan::FilterTokenList filterTokenList;
|
||||
CalpontSelectExecutionPlan::ColumnMap colMap;
|
||||
|
||||
static const std::string sysCatSchemaTablePrefix =
|
||||
CALPONT_SCHEMA + "." + SYSTABLE_TABLE + ".";
|
||||
|
||||
SimpleColumn* c1 =
|
||||
new SimpleColumn(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + AUXCOLUMNOID_COL, fSessionID);
|
||||
new SimpleColumn(sysCatSchemaTablePrefix + AUXCOLUMNOID_COL, fSessionID);
|
||||
SimpleColumn* c2 =
|
||||
new SimpleColumn(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + SCHEMA_COL, fSessionID);
|
||||
new SimpleColumn(sysCatSchemaTablePrefix + SCHEMA_COL, fSessionID);
|
||||
SimpleColumn* c3 =
|
||||
new SimpleColumn(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + TABLENAME_COL, fSessionID);
|
||||
new SimpleColumn(sysCatSchemaTablePrefix + TABLENAME_COL, fSessionID);
|
||||
|
||||
SRCP srcp;
|
||||
srcp.reset(c1);
|
||||
colMap.insert(CMVT_(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + AUXCOLUMNOID_COL, srcp));
|
||||
colMap.insert(CMVT_(sysCatSchemaTablePrefix + AUXCOLUMNOID_COL, srcp));
|
||||
srcp.reset(c2);
|
||||
colMap.insert(CMVT_(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + SCHEMA_COL, srcp));
|
||||
colMap.insert(CMVT_(sysCatSchemaTablePrefix + SCHEMA_COL, srcp));
|
||||
srcp.reset(c3);
|
||||
colMap.insert(CMVT_(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + TABLENAME_COL, srcp));
|
||||
colMap.insert(CMVT_(sysCatSchemaTablePrefix + TABLENAME_COL, srcp));
|
||||
csep.columnMapNonStatic(colMap);
|
||||
|
||||
srcp.reset(c1->clone());
|
||||
@ -3771,15 +3774,18 @@ CalpontSystemCatalog::OID CalpontSystemCatalog::isAUXColumnOID(const OID& oid)
|
||||
CalpontSelectExecutionPlan::FilterTokenList filterTokenList;
|
||||
CalpontSelectExecutionPlan::ColumnMap colMap;
|
||||
|
||||
static const std::string sysCatSchemaTablePrefix =
|
||||
CALPONT_SCHEMA + "." + SYSTABLE_TABLE + ".";
|
||||
|
||||
SimpleColumn* c1 =
|
||||
new SimpleColumn(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + OBJECTID_COL, fSessionID);
|
||||
new SimpleColumn(sysCatSchemaTablePrefix + OBJECTID_COL, fSessionID);
|
||||
SimpleColumn* c2 =
|
||||
new SimpleColumn(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + AUXCOLUMNOID_COL, fSessionID);
|
||||
new SimpleColumn(sysCatSchemaTablePrefix + AUXCOLUMNOID_COL, fSessionID);
|
||||
SRCP srcp;
|
||||
srcp.reset(c1);
|
||||
colMap.insert(CMVT_(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + OBJECTID_COL, srcp));
|
||||
colMap.insert(CMVT_(sysCatSchemaTablePrefix + OBJECTID_COL, srcp));
|
||||
srcp.reset(c2);
|
||||
colMap.insert(CMVT_(CALPONT_SCHEMA + "." + SYSTABLE_TABLE + "." + AUXCOLUMNOID_COL, srcp));
|
||||
colMap.insert(CMVT_(sysCatSchemaTablePrefix + AUXCOLUMNOID_COL, srcp));
|
||||
csep.columnMapNonStatic(colMap);
|
||||
|
||||
srcp.reset(c1->clone());
|
||||
|
@ -265,6 +265,11 @@ void ColumnCommandJL::setLBID(uint64_t rid, uint32_t dbRoot)
|
||||
}
|
||||
}
|
||||
|
||||
if (i == extents.size())
|
||||
{
|
||||
throw logic_error("ColumnCommandJL: setLBID didn't find the extent for the rid.");
|
||||
}
|
||||
|
||||
uint32_t j;
|
||||
|
||||
for (j = 0; j < extentsAux.size(); j++)
|
||||
@ -277,7 +282,7 @@ void ColumnCommandJL::setLBID(uint64_t rid, uint32_t dbRoot)
|
||||
}
|
||||
}
|
||||
|
||||
if (i == extents.size() || (hasAuxCol && j == extentsAux.size()))
|
||||
if (hasAuxCol && j == extentsAux.size())
|
||||
{
|
||||
throw logic_error("ColumnCommandJL: setLBID didn't find the extent for the rid.");
|
||||
}
|
||||
|
@ -717,6 +717,7 @@ struct NewColRequestHeader
|
||||
uint16_t NOPS;
|
||||
uint16_t NVALS;
|
||||
uint8_t sort; // 1 to sort
|
||||
bool hasAuxCol;
|
||||
// this follows the header
|
||||
// ColArgs ArgList[NOPS] (where the val field is DataSize bytes long)
|
||||
// uint16_t Rids[NVALS] (each rid is relative to the given block)
|
||||
|
@ -579,7 +579,6 @@ TupleBPS::TupleBPS(const pColScanStep& rhs, const JobInfo& jobInfo) : BatchPrimi
|
||||
|
||||
sort(extentsAux.begin(), extentsAux.end(), BRM::ExtentSorter());
|
||||
|
||||
extentsMap[fOidAux] = tr1::unordered_map<int64_t, EMEntry>();
|
||||
tr1::unordered_map<int64_t, EMEntry>& refAux = extentsMap[fOidAux];
|
||||
|
||||
for (uint32_t z = 0; z < extentsAux.size(); z++)
|
||||
@ -589,7 +588,6 @@ TupleBPS::TupleBPS(const pColScanStep& rhs, const JobInfo& jobInfo) : BatchPrimi
|
||||
|
||||
/* These lines are obsoleted by initExtentMarkers. Need to remove & retest. */
|
||||
scannedExtents = rhs.extents;
|
||||
extentsMap[fOid] = tr1::unordered_map<int64_t, EMEntry>();
|
||||
tr1::unordered_map<int64_t, EMEntry>& ref = extentsMap[fOid];
|
||||
|
||||
for (uint32_t z = 0; z < rhs.extents.size(); z++)
|
||||
|
Reference in New Issue
Block a user