The original patch to avoid building a hash join's hashtable when the

Tom Lane <tgl@sss.pgh.pa.us>

Commit: e990b9ce23f2be15d48ed518b30931eddd0e59ca
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-09-25T19:37:35Z
Releases: 8.1.0
The original patch to avoid building a hash join's hashtable when the
outer relation is empty did not work, per test case from Patrick Welche.
It tried to use nodeHashjoin.c's high-level mechanisms for fetching an
outer-relation tuple, but that code expected the hash table to be filled
already.  As patched, the code failed in corner cases such as having no
outer-relation tuples for the first hash batch.  Revert and rewrite.

Files

PathChange+/−
src/backend/executor/nodeHash.c modified +8 −44
src/backend/executor/nodeHashjoin.c modified +83 −117
src/include/nodes/execnodes.h modified +3 −2