Skip to content

Commit 30d4772

Browse files
committed
Fix comments in execGrouping.c
Commit 5dfc198 missed updating some comments. Also, fix a comment typo found in passing. Author: Jeff Davis Discussion: https://postgr.es/m/9723131d247b919f94699152647fa87ee0bc02c2.camel%40j-davis.com
1 parent fbbf680 commit 30d4772

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/backend/executor/execGrouping.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,9 @@ FindTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot,
382382
/*
383383
* Compute the hash value for a tuple
384384
*
385-
* The passed-in key is a pointer to TupleHashEntryData. In an actual hash
386-
* table entry, the firstTuple field points to a tuple (in MinimalTuple
387-
* format). LookupTupleHashEntry sets up a dummy TupleHashEntryData with a
388-
* NULL firstTuple field --- that cues us to look at the inputslot instead.
389-
* This convention avoids the need to materialize virtual input tuples unless
390-
* they actually need to get copied into the table.
385+
* If tuple is NULL, use the input slot instead. This convention avoids the
386+
* need to materialize virtual input tuples unless they actually need to get
387+
* copied into the table.
391388
*
392389
* Also, the caller must select an appropriate memory context for running
393390
* the hash functions. (dynahash.c doesn't change CurrentMemoryContext.)
@@ -455,8 +452,6 @@ TupleHashTableHash(struct tuplehash_hash *tb, const MinimalTuple tuple)
455452

456453
/*
457454
* See whether two tuples (presumably of the same hash value) match
458-
*
459-
* As above, the passed pointers are pointers to TupleHashEntryData.
460455
*/
461456
static int
462457
TupleHashTableMatch(struct tuplehash_hash *tb, const MinimalTuple tuple1, const MinimalTuple tuple2)

src/include/nodes/execnodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,7 @@ typedef struct HashInstrumentation
22482248
int nbuckets_original; /* planned number of buckets */
22492249
int nbatch; /* number of batches at end of execution */
22502250
int nbatch_original; /* planned number of batches */
2251-
size_t space_peak; /* speak memory usage in bytes */
2251+
size_t space_peak; /* peak memory usage in bytes */
22522252
} HashInstrumentation;
22532253

22542254
/* ----------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy