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
MCOL-641 Basic support for multi-value inserts, and deletes.
This commit is contained in:
committed by
Roman Nozdrin
parent
55afcd8890
commit
93170c3b31
@ -140,6 +140,7 @@ uint8_t WE_DDLCommandProc::writeSystable(ByteStream& bs, std::string& err)
|
||||
WriteEngine::ColTuple colTuple;
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
WriteEngine::ColTupleList colTuples;
|
||||
WriteEngine::dictStr dctColTuples;
|
||||
WriteEngine::DctnryStruct dctnryStruct;
|
||||
@ -255,6 +256,7 @@ uint8_t WE_DDLCommandProc::writeSystable(ByteStream& bs, std::string& err)
|
||||
}
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
@ -293,7 +295,7 @@ uint8_t WE_DDLCommandProc::writeSystable(ByteStream& bs, std::string& err)
|
||||
// TODO: This may be redundant
|
||||
static boost::mutex dbrmMutex;
|
||||
boost::mutex::scoped_lock lk(dbrmMutex);
|
||||
error = fWEWrapper.insertColumnRec_SYS(txnID, colStructs, colValuesList,
|
||||
error = fWEWrapper.insertColumnRec_SYS(txnID, cscColTypeList, colStructs, colValuesList,
|
||||
dctnryStructList, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (error != WriteEngine::NO_ERROR)
|
||||
@ -392,6 +394,7 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string& err
|
||||
WriteEngine::ColTuple colTuple;
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
WriteEngine::ColTupleList colTuples;
|
||||
WriteEngine::dictStr dctColTuples;
|
||||
WriteEngine::DctnryStruct dctnryStruct;
|
||||
@ -702,6 +705,7 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string& err
|
||||
{
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back (dctnryStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
}
|
||||
|
||||
colList[i].push_back(colTuple);
|
||||
@ -733,7 +737,7 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string& err
|
||||
}
|
||||
|
||||
//fWEWrapper.setDebugLevel(WriteEngine::DEBUG_3);
|
||||
error = fWEWrapper.insertColumnRec_SYS(txnID, colStructs, colValuesList,
|
||||
error = fWEWrapper.insertColumnRec_SYS(txnID, cscColTypeList, colStructs, colValuesList,
|
||||
dctnryStructList, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -819,6 +823,7 @@ uint8_t WE_DDLCommandProc::writeSyscolumn(ByteStream& bs, std::string& err)
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColTuple colTuple;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
WriteEngine::ColTupleList colTuples;
|
||||
WriteEngine::DctColTupleList dctColTuples;
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
@ -1091,6 +1096,7 @@ uint8_t WE_DDLCommandProc::writeSyscolumn(ByteStream& bs, std::string& err)
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back (dctnryStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
colList[i].push_back(colTuple);
|
||||
//colList.push_back(WriteEngine::ColTupleList());
|
||||
//colList.back().push_back(colTuple);
|
||||
@ -1118,7 +1124,7 @@ uint8_t WE_DDLCommandProc::writeSyscolumn(ByteStream& bs, std::string& err)
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
int rc1 = 0;
|
||||
|
||||
error = fWEWrapper.insertColumnRec_SYS(txnID, colStructs, colValuesList,
|
||||
error = fWEWrapper.insertColumnRec_SYS(txnID, cscColTypeList, colStructs, colValuesList,
|
||||
dctnryStructList, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -1368,7 +1374,9 @@ uint8_t WE_DDLCommandProc::deleteSyscolumn(ByteStream& bs, std::string& err)
|
||||
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<void*> colValuesList;
|
||||
WriteEngine::RIDList ridList;
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
@ -1403,17 +1411,19 @@ uint8_t WE_DDLCommandProc::deleteSyscolumn(ByteStream& bs, std::string& err)
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
++column_iterator;
|
||||
}
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
|
||||
if (0 != colStructs.size() && 0 != ridLists[0].size())
|
||||
{
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsColType, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
|
||||
int rc1 = 0;
|
||||
|
||||
@ -1508,7 +1518,9 @@ uint8_t WE_DDLCommandProc::deleteSyscolumnRow(ByteStream& bs, std::string& err)
|
||||
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<void*> colValuesList;
|
||||
WriteEngine::RIDList ridList;
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
@ -1537,17 +1549,20 @@ uint8_t WE_DDLCommandProc::deleteSyscolumnRow(ByteStream& bs, std::string& err)
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
++column_iterator;
|
||||
}
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
|
||||
if (0 != colStructs.size() && 0 != ridLists[0].size())
|
||||
{
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsColType, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
|
||||
int rc1 = 0;
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -1644,7 +1659,9 @@ uint8_t WE_DDLCommandProc::deleteSystable(ByteStream& bs, std::string& err)
|
||||
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<void*> colValuesList;
|
||||
WriteEngine::RIDList ridList;
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
@ -1672,17 +1689,20 @@ uint8_t WE_DDLCommandProc::deleteSystable(ByteStream& bs, std::string& err)
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
++column_iterator;
|
||||
}
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
|
||||
if (0 != colStructs.size() && 0 != ridLists[0].size())
|
||||
{
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsColType, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
|
||||
int rc1 = 0;
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -1755,7 +1775,9 @@ uint8_t WE_DDLCommandProc::deleteSystables(ByteStream& bs, std::string& err)
|
||||
systemCatalogPtr->identity(CalpontSystemCatalog::EC);
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<void*> colValuesList;
|
||||
WriteEngine::RIDList ridList;
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
@ -1804,16 +1826,19 @@ uint8_t WE_DDLCommandProc::deleteSystables(ByteStream& bs, std::string& err)
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
++column_iterator;
|
||||
}
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
|
||||
{
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsColType, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
|
||||
int rc1 = 0;
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -1867,7 +1892,9 @@ uint8_t WE_DDLCommandProc::deleteSystables(ByteStream& bs, std::string& err)
|
||||
CalpontSystemCatalog::RIDList colRidList = systemCatalogPtr->columnRIDs(userTableName);
|
||||
|
||||
colStructs.clear();
|
||||
cscColTypeList.clear();
|
||||
colExtentsStruct.clear();
|
||||
colExtentsColType.clear();
|
||||
colValuesList.clear();
|
||||
ridList.clear();
|
||||
ridLists.clear();
|
||||
@ -1902,17 +1929,20 @@ uint8_t WE_DDLCommandProc::deleteSystables(ByteStream& bs, std::string& err)
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column.colType);
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
++column_iterator;
|
||||
}
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
|
||||
if (0 != colStructs.size() && 0 != ridLists[0].size())
|
||||
{
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
int error = fWEWrapper.deleteRow(txnID, colExtentsColType, colExtentsStruct, colValuesList, ridLists, SYSCOLUMN_BASE);
|
||||
|
||||
int rc1 = 0;
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -2035,6 +2065,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnAuto(ByteStream& bs, std::string& err)
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
//std::vector<BRM::OID_t> oidsToFlush;
|
||||
@ -2075,6 +2106,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnAuto(ByteStream& bs, std::string& err)
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
for (unsigned int i = 0; i < roList.size(); i++)
|
||||
{
|
||||
@ -2083,6 +2115,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnAuto(ByteStream& bs, std::string& err)
|
||||
|
||||
colValuesList.push_back(aColList);
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
std::vector<extentInfo> extentsinfo;
|
||||
extentInfo aExtentinfo;
|
||||
@ -2125,13 +2158,14 @@ uint8_t WE_DDLCommandProc::updateSyscolumnAuto(ByteStream& bs, std::string& err)
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -2226,6 +2260,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnNextvalCol(ByteStream& bs, std::string
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
//std::vector<BRM::OID_t> oidsToFlush;
|
||||
@ -2259,6 +2294,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnNextvalCol(ByteStream& bs, std::string
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
for (unsigned int i = 0; i < roList.size(); i++)
|
||||
{
|
||||
@ -2296,6 +2332,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnNextvalCol(ByteStream& bs, std::string
|
||||
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
@ -2314,13 +2351,14 @@ uint8_t WE_DDLCommandProc::updateSyscolumnNextvalCol(ByteStream& bs, std::string
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
fWEWrapper.setTransId(txnID);
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -2396,6 +2434,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnTablename(ByteStream& bs, std::string&
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
tableName.schema = CALPONT_SCHEMA;
|
||||
tableName.table = SYSCOLUMN_TABLE;
|
||||
@ -2463,6 +2502,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnTablename(ByteStream& bs, std::string&
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
for (unsigned int i = 0; i < roList.size(); i++)
|
||||
{
|
||||
@ -2485,6 +2525,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnTablename(ByteStream& bs, std::string&
|
||||
std::vector<extentInfo> extentsinfo;
|
||||
extentInfo aExtentinfo;
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
|
||||
for (unsigned int i = 0; i < roList.size(); i++)
|
||||
@ -2521,6 +2562,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnTablename(ByteStream& bs, std::string&
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
@ -2529,7 +2571,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnTablename(ByteStream& bs, std::string&
|
||||
fWEWrapper.setBulkFlag(false);
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -2625,6 +2667,7 @@ uint8_t WE_DDLCommandProc::updateSystableAuto(ByteStream& bs, std::string& err)
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
//std::vector<BRM::OID_t> oidsToFlush;
|
||||
@ -2658,12 +2701,14 @@ uint8_t WE_DDLCommandProc::updateSystableAuto(ByteStream& bs, std::string& err)
|
||||
}
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
aColList.push_back(colTuple);
|
||||
colValuesList.push_back(aColList);
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
|
||||
|
||||
@ -2701,6 +2746,7 @@ uint8_t WE_DDLCommandProc::updateSystableAuto(ByteStream& bs, std::string& err)
|
||||
}
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
}
|
||||
|
||||
@ -2710,7 +2756,7 @@ uint8_t WE_DDLCommandProc::updateSystableAuto(ByteStream& bs, std::string& err)
|
||||
fWEWrapper.setBulkFlag(false);
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -2804,6 +2850,7 @@ uint8_t WE_DDLCommandProc::updateSystableTablename(ByteStream& bs, std::string&
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
//std::vector<BRM::OID_t> oidsToFlush;
|
||||
@ -2853,6 +2900,7 @@ uint8_t WE_DDLCommandProc::updateSystableTablename(ByteStream& bs, std::string&
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -2865,6 +2913,7 @@ uint8_t WE_DDLCommandProc::updateSystableTablename(ByteStream& bs, std::string&
|
||||
colValuesList.push_back(aColList);
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
|
||||
dctColList = dictTuple;
|
||||
dctRowList.push_back(dctColList);
|
||||
@ -2900,6 +2949,7 @@ uint8_t WE_DDLCommandProc::updateSystableTablename(ByteStream& bs, std::string&
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
@ -2908,7 +2958,7 @@ uint8_t WE_DDLCommandProc::updateSystableTablename(ByteStream& bs, std::string&
|
||||
fWEWrapper.setBulkFlag(false);
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -3032,6 +3082,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
//std::vector<BRM::OID_t> oidsToFlush;
|
||||
@ -3090,6 +3141,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -3102,6 +3154,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
colValuesList.push_back(aColList);
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
|
||||
dctColList = dictTuple;
|
||||
dctRowList.push_back(dctColList);
|
||||
@ -3137,6 +3190,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
@ -3145,7 +3199,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
fWEWrapper.setBulkFlag(false);
|
||||
fWEWrapper.startTransaction(txnID);
|
||||
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -3207,6 +3261,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
colValuesList.clear();
|
||||
aColList.clear();
|
||||
colStructs.clear();
|
||||
cscColTypeList.clear();
|
||||
colOldValuesList.clear();
|
||||
oids.clear();
|
||||
tableName.schema = CALPONT_SCHEMA;
|
||||
@ -3287,6 +3342,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
for (unsigned int i = 0; i < roList.size(); i++)
|
||||
{
|
||||
@ -3307,6 +3363,7 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
dctnryValueList.push_back(dctRowList);
|
||||
extentsinfo.clear();
|
||||
colExtentsStruct.clear();
|
||||
colExtentsColType.clear();
|
||||
dctnryExtentsStruct.clear();
|
||||
oid = 1021;
|
||||
|
||||
@ -3344,10 +3401,11 @@ uint8_t WE_DDLCommandProc::updateSystablesTablename(ByteStream& bs, std::string&
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
rc = fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE);
|
||||
|
||||
if (rc != NO_ERROR)
|
||||
@ -3481,11 +3539,13 @@ uint8_t WE_DDLCommandProc::updateSyscolumnColumnposCol(messageqcpp::ByteStream&
|
||||
WriteEngine::ColStruct colStruct;
|
||||
WriteEngine::DctnryStructList dctnryStructList;
|
||||
WriteEngine::DctnryValueList dctnryValueList;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
CalpontSystemCatalog::ColType colType;
|
||||
//Build column structure for COLUMNPOS_COL
|
||||
colStruct.dataOid = OID_SYSCOLUMN_COLUMNPOS;
|
||||
colStruct.colWidth = 4;
|
||||
colType.columnOID = colStruct.dataOid = OID_SYSCOLUMN_COLUMNPOS;
|
||||
colType.colWidth = colStruct.colWidth = 4;
|
||||
colStruct.tokenFlag = false;
|
||||
colStruct.colDataType = CalpontSystemCatalog::INT;
|
||||
colType.colDataType = colStruct.colDataType = CalpontSystemCatalog::INT;
|
||||
colStruct.fColDbRoot = dbRoot;
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
@ -3494,9 +3554,10 @@ uint8_t WE_DDLCommandProc::updateSyscolumnColumnposCol(messageqcpp::ByteStream&
|
||||
}
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
cscColTypeList.push_back(colType);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
rc = fWEWrapper.updateColumnRecs( txnID, colStructs, colValuesList, ridList, SYSCOLUMN_BASE );
|
||||
rc = fWEWrapper.updateColumnRecs( txnID, cscColTypeList, colStructs, colValuesList, ridList, SYSCOLUMN_BASE );
|
||||
}
|
||||
|
||||
int rc1 = 0;
|
||||
@ -3592,7 +3653,7 @@ uint8_t WE_DDLCommandProc::fillNewColumn(ByteStream& bs, std::string& err)
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
oids[dataOid] = dataOid;
|
||||
oids[refColOID] = refColOID;
|
||||
rc = fWEWrapper.fillColumn(txnID, dataOid, dataType, dataWidth, defaultVal, refColOID, refColDataType,
|
||||
rc = fWEWrapper.fillColumn(txnID, dataOid, colType, defaultVal, refColOID, refColDataType,
|
||||
refColWidth, refCompressionType, isNULL, compressionType, defaultValStr, dictOid, autoincrement);
|
||||
|
||||
if ( rc != 0 )
|
||||
@ -4163,6 +4224,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnSetDefault(messageqcpp::ByteStream& bs
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList1;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
WriteEngine::DctnryStructList dctnryStructList;
|
||||
WriteEngine::DctnryValueList dctnryValueList;
|
||||
@ -4268,6 +4330,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnSetDefault(messageqcpp::ByteStream& bs
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -4299,6 +4362,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnSetDefault(messageqcpp::ByteStream& bs
|
||||
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
ridLists.push_back(ridList);
|
||||
|
||||
@ -4329,11 +4393,12 @@ uint8_t WE_DDLCommandProc::updateSyscolumnSetDefault(messageqcpp::ByteStream& bs
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
|
||||
if (NO_ERROR != fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
if (NO_ERROR != fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE))
|
||||
{
|
||||
err = "WE: Update failed on: " + atableName.table;
|
||||
@ -4439,6 +4504,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
WriteEngine::ColValueList colValuesList;
|
||||
WriteEngine::ColTupleList aColList1;
|
||||
WriteEngine::ColStructList colStructs;
|
||||
WriteEngine::CSCTypesList cscColTypeList;
|
||||
std::vector<void*> colOldValuesList;
|
||||
std::map<uint32_t, uint32_t> oids;
|
||||
//std::vector<BRM::OID_t> oidsToFlush;
|
||||
@ -4557,6 +4623,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column1.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -4594,6 +4661,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column2.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -4627,6 +4695,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column3.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -4661,6 +4730,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
|
||||
colStructs.push_back(colStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column4.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -4770,6 +4840,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
colStructs.push_back(colStruct);
|
||||
dctnryStructList.push_back(dctnryStruct);
|
||||
oids[colStruct.dataOid] = colStruct.dataOid;
|
||||
cscColTypeList.push_back(column5.colType);
|
||||
|
||||
//oidsToFlush.push_back(colStruct.dataOid);
|
||||
if (dctnryStruct.dctnryOid > 0)
|
||||
@ -4797,6 +4868,7 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
dctRowList.push_back(dctColList);
|
||||
dctnryValueList.push_back(dctRowList);
|
||||
std::vector<WriteEngine::ColStructList> colExtentsStruct;
|
||||
std::vector<WriteEngine::CSCTypesList> colExtentsColType;
|
||||
std::vector<WriteEngine::DctnryStructList> dctnryExtentsStruct;
|
||||
std::vector<WriteEngine::RIDList> ridLists;
|
||||
ridLists.push_back(ridList);
|
||||
@ -4828,10 +4900,11 @@ uint8_t WE_DDLCommandProc::updateSyscolumnRenameColumn(messageqcpp::ByteStream&
|
||||
|
||||
colExtentsStruct.push_back(colStructs);
|
||||
dctnryExtentsStruct.push_back(dctnryStructList);
|
||||
colExtentsColType.push_back(cscColTypeList);
|
||||
}
|
||||
|
||||
// call the write engine to update the row
|
||||
if (NO_ERROR != fWEWrapper.updateColumnRec(txnID, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
if (NO_ERROR != fWEWrapper.updateColumnRec(txnID, colExtentsColType, colExtentsStruct, colValuesList, colOldValuesList,
|
||||
ridLists, dctnryExtentsStruct, dctnryValueList, SYSCOLUMN_BASE))
|
||||
{
|
||||
err = "WE: Update failed on: " + atableName.table;
|
||||
|
Reference in New Issue
Block a user