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

Function ExecHashAccumInstrumentation

src/backend/executor/nodeHash.c:3405–3419  ·  view source on GitHub ↗

* Accumulate instrumentation data from 'hashtable' into an * initially-zeroed HashInstrumentation struct. * * This is used to merge information across successive hash table instances * within a single plan node. We take the maximum values of each interesting * number. The largest nbuckets and largest nbatch values might have occurred * in different instances, so there's some risk of confus

Source from the content-addressed store, hash-verified

3403 * in depending on that here, so handle them the same way.
3404 */
3405void
3406ExecHashAccumInstrumentation(HashInstrumentation *instrument,
3407 HashJoinTable hashtable)
3408{
3409 instrument->nbuckets = Max(instrument->nbuckets,
3410 hashtable->nbuckets);
3411 instrument->nbuckets_original = Max(instrument->nbuckets_original,
3412 hashtable->nbuckets_original);
3413 instrument->nbatch = Max(instrument->nbatch,
3414 hashtable->nbatch);
3415 instrument->nbatch_original = Max(instrument->nbatch_original,
3416 hashtable->nbatch_original);
3417 instrument->space_peak = Max(instrument->space_peak,
3418 hashtable->spacePeak);
3419}
3420
3421/*
3422 * Allocate 'size' bytes from the currently active HashMemoryChunk

Callers 3

ExecShutdownHashFunction · 0.85
ExecReScanHashJoinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected