MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / scan

Method scan

src/processor/operator/aggregate/hash_aggregate.cpp:180–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void HashAggregateSharedState::scan(std::span<uint8_t*> entries,
181 std::vector<common::ValueVector*>& keyVectors, offset_t startOffset, offset_t numTuplesToScan,
182 std::vector<uint32_t>& columnIndices) {
183 auto [table, tableStartOffset] = getPartitionForOffset(startOffset);
184 // Due to the way FactorizedTable::lookup works, it's necessary to read one partition
185 // at a time.
186 DASSERT(startOffset - tableStartOffset + numTuplesToScan <= table->getNumTuples());
187 for (size_t pos = 0; pos < numTuplesToScan; pos++) {
188 auto posInTable = startOffset + pos - tableStartOffset;
189 entries[pos] = table->getTuple(posInTable);
190 }
191 table->lookup(keyVectors, columnIndices, entries.data(), 0, numTuplesToScan);
192 DASSERT(true);
193}
194
195void HashAggregateSharedState::assertFinalized() const {
196 RUNTIME_CHECK(for (const auto& partition

Callers 4

finalizePartitionsMethod · 0.45
getNextTuplesInternalMethod · 0.45
mergeIfFullMethod · 0.45

Calls 4

getNumTuplesMethod · 0.45
getTupleMethod · 0.45
lookupMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected