1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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:
Gagan Goel
2022-05-13 15:27:02 -04:00
parent 60eb0f86ec
commit 2280b1dd25
14 changed files with 562 additions and 123 deletions

View File

@ -147,6 +147,7 @@ BatchPrimitiveProcessor::BatchPrimitiveProcessor()
{
pp.setLogicalBlockMode(true);
pp.setBlockPtr((int*)blockData);
pp.setBlockPtrAux((int*)blockDataAux);
pthread_mutex_init(&objLock, NULL);
}
@ -206,6 +207,7 @@ BatchPrimitiveProcessor::BatchPrimitiveProcessor(ByteStream& b, double prefetch,
pp.setLogicalBlockMode(true);
pp.setBlockPtr((int*)blockData);
pp.setBlockPtrAux((int*)blockDataAux);
sendThread = bppst;
pthread_mutex_init(&objLock, NULL);
initBPP(b);
@ -600,8 +602,8 @@ void BatchPrimitiveProcessor::resetBPP(ByteStream& bs, const SP_UM_MUTEX& w, con
/* init vars not part of the BS */
currentBlockOffset = 0;
memset(relLBID.get(), 0, sizeof(uint64_t) * (projectCount + 1));
memset(asyncLoaded.get(), 0, sizeof(bool) * (projectCount + 1));
memset(relLBID.get(), 0, sizeof(uint64_t) * (projectCount + 2));
memset(asyncLoaded.get(), 0, sizeof(bool) * (projectCount + 2));
buildVSSCache(count);
#ifdef __FreeBSD__
@ -1156,9 +1158,11 @@ void BatchPrimitiveProcessor::initProcessor()
}
// @bug 1269, initialize data used by execute() for async loading blocks
// +1 for the scan filter step with no predicate, if any
relLBID.reset(new uint64_t[projectCount + 1]);
asyncLoaded.reset(new bool[projectCount + 1]);
// +2 for:
// 1. the scan filter step with no predicate, if any
// 2. AUX column
relLBID.reset(new uint64_t[projectCount + 2]);
asyncLoaded.reset(new bool[projectCount + 2]);
}
/* This version does a join on projected rows */
@ -1468,6 +1472,19 @@ void BatchPrimitiveProcessor::execute()
asyncLoaded[p] = true;
}
if (col->hasAuxCol())
{
asyncLoaded[p + 1] = asyncLoaded[p + 1] && (relLBID[p + 1] % blocksReadAhead != 0);
relLBID[p + 1] += 1;
if (!asyncLoaded[p + 1])
{
loadBlockAsync(col->getLBIDAux(), versionInfo, txnID, 2, &cachedIO, &physIO,
LBIDTrace, sessionID, &counterLock, &busyLoaderCount, sendThread, &vssCache);
asyncLoaded[p + 1] = true;
}
}
asyncLoadProjectColumns();
}
}