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

Function attrMap

src/backend/executor/execMain.c:4156–4171  ·  view source on GitHub ↗

Use the given attribute map to convert an attribute number in the * base relation to an attribute number in the other relation. Forgive * out-of-range attributes by mapping them to zero. Treat null as * the identity map. */

Source from the content-addressed store, hash-verified

4154 * the identity map.
4155 */
4156AttrNumber
4157attrMap(TupleConversionMap *map, AttrNumber anum)
4158{
4159 if (map == NULL)
4160 return anum;
4161
4162 if (0 < anum && anum <= map->indesc->natts)
4163 {
4164 for (int i = 0; i < map->outdesc->natts; i++)
4165 {
4166 if (map->attrMap->attnums[i] == anum)
4167 return i + 1;
4168 }
4169 }
4170 return 0;
4171}
4172
4173/* For attrMapExpr below.
4174 *

Callers 1

apply_attrmap_mutatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected