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

Function execTuplesMatchPrepare

src/backend/executor/execGrouping.c:60–85  ·  view source on GitHub ↗

* execTuplesMatchPrepare * Build expression that can be evaluated using ExecQual(), returning * whether an ExprContext's inner/outer tuples are NOT DISTINCT */

Source from the content-addressed store, hash-verified

58 * whether an ExprContext's inner/outer tuples are NOT DISTINCT
59 */
60ExprState *
61execTuplesMatchPrepare(TupleDesc desc,
62 int numCols,
63 const AttrNumber *keyColIdx,
64 const Oid *eqOperators,
65 const Oid *collations,
66 PlanState *parent)
67{
68 Oid *eqFunctions = (Oid *) palloc(numCols * sizeof(Oid));
69 int i;
70 ExprState *expr;
71
72 if (numCols == 0)
73 return NULL;
74
75 /* lookup equality functions */
76 for (i = 0; i < numCols; i++)
77 eqFunctions[i] = get_opcode(eqOperators[i]);
78
79 /* build actual expression */
80 expr = ExecBuildGroupingEqual(desc, desc, NULL, NULL,
81 numCols, keyColIdx, eqFunctions, collations,
82 parent);
83
84 return expr;
85}
86
87/*
88 * execTuplesHashPrepare

Callers 8

ExecInitSetOpFunction · 0.85
ExecInitUniqueFunction · 0.85
ExecInitWindowAggFunction · 0.85
ExecInitLimitFunction · 0.85
ExecInitAggFunction · 0.85
ExecInitGroupFunction · 0.85

Calls 3

get_opcodeFunction · 0.85
ExecBuildGroupingEqualFunction · 0.85
pallocFunction · 0.50

Tested by

no test coverage detected