You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-5021 Add support for the AUX column in ExeMgr and PrimProc.
In the joblist code, in addition to sending the lbid of the SCAN column, we also send the corresponding lbid of the AUX column to PrimProc. In the primitives processor code in PrimProc, we load the AUX column block (8192 rows since the AUX column is implemented as a 1-byte UNSIGNED TINYINT) into memory and then pass it down to the low-level scanning (vectorized scanning as applicable) routine to build a non-Empty mask for the block being processed to filter out DELETED rows based on comparison of the AUX block row to the empty magic value for the AUX column.
This commit is contained in:
@ -43,7 +43,9 @@ using namespace messageqcpp;
|
||||
|
||||
namespace joblist
|
||||
{
|
||||
ColumnCommandJL::ColumnCommandJL(const pColScanStep& scan, vector<BRM::LBID_t> lastLBID)
|
||||
ColumnCommandJL::ColumnCommandJL(const pColScanStep& scan, vector<BRM::LBID_t> lastLBID,
|
||||
bool hasAuxCol_, const std::vector<BRM::EMEntry>& extentsAux_) :
|
||||
extentsAux(extentsAux_), hasAuxCol(hasAuxCol_)
|
||||
{
|
||||
BRM::DBRM dbrm;
|
||||
isScan = true;
|
||||
@ -88,6 +90,7 @@ ColumnCommandJL::ColumnCommandJL(const pColStep& step)
|
||||
BRM::DBRM dbrm;
|
||||
|
||||
isScan = false;
|
||||
hasAuxCol = false;
|
||||
|
||||
/* grab necessary vars from step */
|
||||
traceFlags = step.fTraceFlags;
|
||||
@ -210,6 +213,10 @@ void ColumnCommandJL::createCommand(ByteStream& bs) const
|
||||
bs << BOP;
|
||||
bs << filterCount;
|
||||
}
|
||||
if (hasAuxCol)
|
||||
bs << (uint8_t)1;
|
||||
else
|
||||
bs << (uint8_t)0;
|
||||
serializeInlineVector(bs, fLastLbid);
|
||||
|
||||
CommandJL::createCommand(bs);
|
||||
@ -218,6 +225,9 @@ void ColumnCommandJL::createCommand(ByteStream& bs) const
|
||||
void ColumnCommandJL::runCommand(ByteStream& bs) const
|
||||
{
|
||||
bs << lbid;
|
||||
|
||||
if (hasAuxCol)
|
||||
bs << lbidAux;
|
||||
}
|
||||
|
||||
void ColumnCommandJL::setLBID(uint64_t rid, uint32_t dbRoot)
|
||||
@ -247,11 +257,26 @@ void ColumnCommandJL::setLBID(uint64_t rid, uint32_t dbRoot)
|
||||
"; blockNum = " << blockNum << "; OID=" << OID << " LBID=" << lbid;
|
||||
cout << os.str() << endl;
|
||||
*/
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
throw logic_error("ColumnCommandJL: setLBID didn't find the extent for the rid.");
|
||||
uint32_t j;
|
||||
|
||||
for (j = 0; j < extentsAux.size(); j++)
|
||||
{
|
||||
if (extentsAux[j].dbRoot == dbRoot && extentsAux[j].partitionNum == partNum &&
|
||||
extentsAux[j].segmentNum == segNum && extentsAux[j].blockOffset == (extentNum * 1 * 1024))
|
||||
{
|
||||
lbidAux = extentsAux[j].range.start + (blockNum * 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == extents.size() || (hasAuxCol && j == extentsAux.size()))
|
||||
{
|
||||
throw logic_error("ColumnCommandJL: setLBID didn't find the extent for the rid.");
|
||||
}
|
||||
|
||||
// ostringstream os;
|
||||
// os << "CCJL: rid=" << rid << "; dbroot=" << dbRoot << "; partitionNum=" << partitionNum << ";
|
||||
|
Reference in New Issue
Block a user