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

Function ExecGetChildToRootMap

src/backend/executor/execUtils.c:1291–1310  ·  view source on GitHub ↗

* Return the map needed to convert given child result relation's tuples to * the rowtype of the query's main target ("root") relation. Note that a * NULL result is valid and means that no conversion is needed. */

Source from the content-addressed store, hash-verified

1289 * NULL result is valid and means that no conversion is needed.
1290 */
1291TupleConversionMap *
1292ExecGetChildToRootMap(ResultRelInfo *resultRelInfo)
1293{
1294 /* If we didn't already do so, compute the map for this child. */
1295 if (!resultRelInfo->ri_ChildToRootMapValid)
1296 {
1297 ResultRelInfo *rootRelInfo = resultRelInfo->ri_RootResultRelInfo;
1298
1299 if (rootRelInfo)
1300 resultRelInfo->ri_ChildToRootMap =
1301 convert_tuples_by_name(RelationGetDescr(resultRelInfo->ri_RelationDesc),
1302 RelationGetDescr(rootRelInfo->ri_RelationDesc));
1303 else /* this isn't a child result rel */
1304 resultRelInfo->ri_ChildToRootMap = NULL;
1305
1306 resultRelInfo->ri_ChildToRootMapValid = true;
1307 }
1308
1309 return resultRelInfo->ri_ChildToRootMap;
1310}
1311
1312/* Return a bitmap representing columns being inserted */
1313Bitmapset *

Callers 3

AfterTriggerSaveEventFunction · 0.85
ExecCrossPartitionUpdateFunction · 0.85
adjust_partition_colnosFunction · 0.85

Calls 1

convert_tuples_by_nameFunction · 0.85

Tested by

no test coverage detected