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

Function cdbpullup_truncatePathKeysForTargetList

src/backend/cdb/cdbpullup.c:343–360  ·  view source on GitHub ↗

* cdbpullup_truncatePathKeysForTargetList * * Truncate a list of pathkeys to only those that can be evaluated * using the given target list. */

Source from the content-addressed store, hash-verified

341 * using the given target list.
342 */
343List *
344cdbpullup_truncatePathKeysForTargetList(List *pathkeys, List *targetlist)
345{
346 List *new_pathkeys = NIL;
347 ListCell *lc;
348
349 foreach(lc, pathkeys)
350 {
351 PathKey *pk = (PathKey *) lfirst(lc);
352
353 if (!cdbpullup_findEclassInTargetList(pk->pk_eclass, targetlist, InvalidOid, NULL))
354 break;
355
356 new_pathkeys = lappend(new_pathkeys, pk);
357 }
358
359 return new_pathkeys;
360}
361
362/*
363 * cdbpullup_make_var

Callers 1

grouping_plannerFunction · 0.85

Calls 3

lappendFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected