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

Function classify_matching_subplans

src/backend/executor/nodeAppend.c:1192–1225  ·  view source on GitHub ↗

---------------------------------------------------------------- * classify_matching_subplans * * Classify the node's as_valid_subplans into sync ones and * async ones, adjust it to contain sync ones only, and save * async ones in the node's as_valid_asyncplans. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

1190 * ----------------------------------------------------------------
1191 */
1192static void
1193classify_matching_subplans(AppendState *node)
1194{
1195 Bitmapset *valid_asyncplans;
1196
1197 Assert(node->as_valid_asyncplans == NULL);
1198
1199 /* Nothing to do if there are no valid subplans. */
1200 if (bms_is_empty(node->as_valid_subplans))
1201 {
1202 node->as_syncdone = true;
1203 node->as_nasyncremain = 0;
1204 return;
1205 }
1206
1207 /* Nothing to do if there are no valid async subplans. */
1208 if (!bms_overlap(node->as_valid_subplans, node->as_asyncplans))
1209 {
1210 node->as_nasyncremain = 0;
1211 return;
1212 }
1213
1214 /* Get valid async subplans. */
1215 valid_asyncplans = bms_copy(node->as_asyncplans);
1216 valid_asyncplans = bms_int_members(valid_asyncplans,
1217 node->as_valid_subplans);
1218
1219 /* Adjust the valid subplans to contain sync subplans only. */
1220 node->as_valid_subplans = bms_del_members(node->as_valid_subplans,
1221 valid_asyncplans);
1222
1223 /* Save valid async subplans. */
1224 node->as_valid_asyncplans = valid_asyncplans;
1225}
1226
1227void
1228ExecSquelchAppend(AppendState *node, bool force)

Callers 2

ExecInitAppendFunction · 0.85
ExecAppendAsyncBeginFunction · 0.85

Calls 5

bms_is_emptyFunction · 0.85
bms_overlapFunction · 0.85
bms_copyFunction · 0.85
bms_int_membersFunction · 0.85
bms_del_membersFunction · 0.85

Tested by

no test coverage detected