MCPcopy Create free account
hub / github.com/apache/cloudberry / prepare_hash_slot

Function prepare_hash_slot

src/backend/executor/nodeAgg.c:1263–1282  ·  view source on GitHub ↗

* Extract the attributes that make up the grouping key into the * hashslot. This is necessary to compute the hash or perform a lookup. */

Source from the content-addressed store, hash-verified

1261 * hashslot. This is necessary to compute the hash or perform a lookup.
1262 */
1263static inline void
1264prepare_hash_slot(AggStatePerHash perhash,
1265 TupleTableSlot *inputslot,
1266 TupleTableSlot *hashslot)
1267{
1268 int i;
1269
1270 /* transfer just the needed columns into hashslot */
1271 slot_getsomeattrs(inputslot, perhash->largestGrpColIdx);
1272 ExecClearTuple(hashslot);
1273
1274 for (i = 0; i < perhash->numhashGrpCols; i++)
1275 {
1276 int varNumber = perhash->hashGrpColIdxInput[i] - 1;
1277
1278 hashslot->tts_values[i] = inputslot->tts_values[varNumber];
1279 hashslot->tts_isnull[i] = inputslot->tts_isnull[varNumber];
1280 }
1281 ExecStoreVirtualTuple(hashslot);
1282}
1283
1284/*
1285 * Prepare to finalize and project based on the specified representative tuple

Callers 2

lookup_hash_entriesFunction · 0.85
agg_refill_hash_tableFunction · 0.85

Calls 3

slot_getsomeattrsFunction · 0.85
ExecClearTupleFunction · 0.85
ExecStoreVirtualTupleFunction · 0.85

Tested by

no test coverage detected