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
@ -65,12 +65,13 @@ ExtentStripeAlloc::~ExtentStripeAlloc()
|
||||
// Add a column to be associated with the "stripe" allocations for "this"
|
||||
// ExtentStripeAlloc object.
|
||||
//------------------------------------------------------------------------------
|
||||
void ExtentStripeAlloc::addColumn(OID colOID, int colWidth)
|
||||
void ExtentStripeAlloc::addColumn(OID colOID, int colWidth, datatypes::SystemCatalog::ColDataType colDataType)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(fMapMutex);
|
||||
|
||||
fColOIDs.push_back(colOID);
|
||||
fColWidths.push_back(colWidth);
|
||||
fColDataTypes.push_back(colDataType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -161,6 +162,7 @@ int ExtentStripeAlloc::allocateExtent(OID oid, uint16_t dbRoot,
|
||||
BRM::CreateStripeColumnExtentsArgIn colEntry;
|
||||
colEntry.oid = fColOIDs[j];
|
||||
colEntry.width = fColWidths[j];
|
||||
colEntry.colDataType = fColDataTypes[j];
|
||||
cols.push_back(colEntry);
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ class ExtentStripeAlloc
|
||||
* @param colOID Column OID to be added to extent allocation list.
|
||||
* @param colWidth Width of column associated with colOID.
|
||||
*/
|
||||
void addColumn(OID colOID, int colWidth);
|
||||
void addColumn(OID colOID, int colWidth, datatypes::SystemCatalog::ColDataType colDataType);
|
||||
|
||||
/** @brief Request an extent allocation for the specified OID and DBRoot.
|
||||
* A "stripe" of extents for the corresponding table will be allocated
|
||||
@ -159,6 +159,7 @@ class ExtentStripeAlloc
|
||||
boost::mutex fMapMutex; // protects unordered map access
|
||||
std::vector<OID> fColOIDs; // Vector of column OIDs
|
||||
std::vector<int> fColWidths; // Widths associated with fColOIDs
|
||||
std::vector<datatypes::SystemCatalog::ColDataType> fColDataTypes;
|
||||
|
||||
// unordered map where we collect the allocated extents
|
||||
std::tr1::unordered_multimap<OID, AllocExtEntry, AllocExtHasher> fMap;
|
||||
|
@ -1249,7 +1249,7 @@ void TableInfo::addColumn(ColumnInfo* info)
|
||||
fColumns.push_back(info);
|
||||
fNumberOfColumns = fColumns.size();
|
||||
|
||||
fExtentStrAlloc.addColumn(info->column.mapOid, info->column.width);
|
||||
fExtentStrAlloc.addColumn(info->column.mapOid, info->column.width, info->column.dataType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user