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

Function ExecGetUpdatedCols

src/backend/executor/execUtils.c:1352–1375  ·  view source on GitHub ↗

Return a bitmap representing columns being updated */

Source from the content-addressed store, hash-verified

1350
1351/* Return a bitmap representing columns being updated */
1352Bitmapset *
1353ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate)
1354{
1355 /* see ExecGetInsertedCols() */
1356 if (relinfo->ri_RangeTableIndex != 0)
1357 {
1358 RangeTblEntry *rte = exec_rt_fetch(relinfo->ri_RangeTableIndex, estate);
1359
1360 return rte->updatedCols;
1361 }
1362 else if (relinfo->ri_RootResultRelInfo)
1363 {
1364 ResultRelInfo *rootRelInfo = relinfo->ri_RootResultRelInfo;
1365 RangeTblEntry *rte = exec_rt_fetch(rootRelInfo->ri_RangeTableIndex, estate);
1366
1367 if (relinfo->ri_RootToPartitionMap != NULL)
1368 return execute_attr_map_cols(relinfo->ri_RootToPartitionMap->attrMap,
1369 rte->updatedCols);
1370 else
1371 return rte->updatedCols;
1372 }
1373 else
1374 return NULL;
1375}
1376
1377/* Return a bitmap representing generated columns being updated */
1378Bitmapset *

Callers 4

ExecConstraintsFunction · 0.85
ExecWithCheckOptionsFunction · 0.85
ExecGetAllUpdatedColsFunction · 0.85

Calls 2

exec_rt_fetchFunction · 0.85
execute_attr_map_colsFunction · 0.85

Tested by

no test coverage detected