You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time of writing our main column scan operator uses the following function from column.cpp:
void Column::readValues(
const shared_ptr<ValueVector>& nodeIDVector, const shared_ptr<ValueVector>& valueVector) {
assert(nodeIDVector->dataType.typeID == NODE);
if (nodeIDVector->state->isFlat()) {
auto pos = nodeIDVector->state->getPositionOfCurrIdx();
readForSingleNodeIDPosition(pos, nodeIDVector, valueVector);
} else {
for (auto i = 0ul; i < nodeIDVector->state->selectedSize; i++) {
auto pos = nodeIDVector->state->selectedPositions[i];
readForSingleNodeIDPosition(pos, nodeIDVector, valueVector);
}
}
}
void Column::readForSingleNodeIDPosition(uint32_t pos, const shared_ptr<ValueVector>& nodeIDVector,
const shared_ptr<ValueVector>& resultVector) {
if (nodeIDVector->isNull(pos)) {
resultVector->setNull(pos, true);
return;
}
auto pageCursor = PageUtils::getPageElementCursorForOffset(
nodeIDVector->readNodeOffset(pos), numElementsPerPage);
auto frame = bufferManager.pin(fileHandle, pageCursor.idx);
memcpy(resultVector->values + pos * elementSize,
frame + mapElementPosToByteOffset(pageCursor.pos), elementSize);
setNULLBitsForAPos(resultVector, frame, pageCursor.pos, pos);
bufferManager.unpin(fileHandle, pageCursor.idx);
}
That is, for each node in the vector, we read it's value, which attempts to pin a page through the BM, so acquires a lock etc. This is quite inefficient for the case when the given nodeIDs are consecutive and many of them can be scanned in chunks. We need a fast path to be able to perform these fast scans.
The text was updated successfully, but these errors were encountered:
semihsalihoglu-uw
changed the title
Scanning a vector of nodeIDs in columns too
Fast scan of a vector of consecutive nodeIDs in columns
May 5, 2022
semihsalihoglu-uw
changed the title
Fast scan of a vector of consecutive nodeIDs in columns
Fast scan of a vector of properties of consecutive node IDs in columns
May 5, 2022
At the time of writing our main column scan operator uses the following function from column.cpp:
That is, for each node in the vector, we read it's value, which attempts to pin a page through the BM, so acquires a lock etc. This is quite inefficient for the case when the given nodeIDs are consecutive and many of them can be scanned in chunks. We need a fast path to be able to perform these fast scans.
The text was updated successfully, but these errors were encountered: