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

Function ExecEndHashJoin

src/backend/executor/nodeHashjoin.c:1031–1066  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecEndHashJoin * * clean up routine for HashJoin node * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

1029 * ----------------------------------------------------------------
1030 */
1031void
1032ExecEndHashJoin(HashJoinState *node)
1033{
1034 /*
1035 * Free hash table
1036 */
1037 if (node->hj_HashTable)
1038 {
1039 if (!node->hj_HashTable->eagerlyReleased)
1040 {
1041 HashState *hashState = (HashState *) innerPlanState(node);
1042
1043 ExecHashTableDestroy(hashState, node->hj_HashTable);
1044 }
1045 pfree(node->hj_HashTable);
1046 node->hj_HashTable = NULL;
1047 }
1048
1049 /*
1050 * Free the exprcontext
1051 */
1052 ExecFreeExprContext(&node->js.ps);
1053
1054 /*
1055 * clean out the tuple table
1056 */
1057 ExecClearTuple(node->js.ps.ps_ResultTupleSlot);
1058 ExecClearTuple(node->hj_OuterTupleSlot);
1059 ExecClearTuple(node->hj_HashTupleSlot);
1060
1061 /*
1062 * clean up subtrees
1063 */
1064 ExecEndNode(outerPlanState(node));
1065 ExecEndNode(innerPlanState(node));
1066}
1067
1068/*
1069 * ExecHashJoinOuterGetTuple

Callers 1

ExecEndNodeFunction · 0.85

Calls 5

ExecHashTableDestroyFunction · 0.85
ExecFreeExprContextFunction · 0.85
ExecClearTupleFunction · 0.85
ExecEndNodeFunction · 0.85
pfreeFunction · 0.50

Tested by

no test coverage detected