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

Function CreateNodeSetHashTable

src/backend/optimizer/util/predtest_valueset.c:89–104  ·  view source on GitHub ↗

* returns a hashtable that can be used to map from a node to itself */

Source from the content-addressed store, hash-verified

87 * returns a hashtable that can be used to map from a node to itself
88 */
89static HTAB*
90CreateNodeSetHashTable(MemoryContext memoryContext)
91{
92 HASHCTL hash_ctl;
93
94 MemSet(&hash_ctl, 0, sizeof(hash_ctl));
95
96 hash_ctl.keysize = sizeof(Const **);
97 hash_ctl.entrysize = sizeof(ConstHashValue);
98 hash_ctl.hash = ConstHashTableHash;
99 hash_ctl.match = ConstHashTableMatch;
100 hash_ctl.hcxt = memoryContext;
101
102 return hash_create("ConstantSet", 16, &hash_ctl,
103 HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
104}
105
106/**
107 * basic operation on PossibleValueSet: initialize to "any value possible"

Callers 2

AddValueFunction · 0.85
SetToNoValuesPossibleFunction · 0.85

Calls 1

hash_createFunction · 0.85

Tested by

no test coverage detected