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

Function targetIsInAllPartitionLists

src/backend/optimizer/path/allpaths.c:4318–4331  ·  view source on GitHub ↗

* targetIsInAllPartitionLists * True if the TargetEntry is listed in the PARTITION BY clause * of every window defined in the query. * * It would be safe to ignore windows not actually used by any window * function, but it's not easy to get that info at this stage; and it's * unlikely to be useful to spend any extra cycles getting it, since * unreferenced window definitions are probably i

Source from the content-addressed store, hash-verified

4316 * unreferenced window definitions are probably infrequent in practice.
4317 */
4318static bool
4319targetIsInAllPartitionLists(TargetEntry *tle, Query *query)
4320{
4321 ListCell *lc;
4322
4323 foreach(lc, query->windowClause)
4324 {
4325 WindowClause *wc = (WindowClause *) lfirst(lc);
4326
4327 if (!targetIsInSortList(tle, InvalidOid, wc->partitionClause))
4328 return false;
4329 }
4330 return true;
4331}
4332
4333/*
4334 * qual_is_pushdown_safe - is a particular rinfo safe to push down?

Callers 1

check_output_expressionsFunction · 0.85

Calls 2

targetIsInSortListFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected