mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
Remove unused parameter from check_and_push_window_quals
... and find_window_run_conditions.
This seems to have been around and unused ever since the Run Condition
feature was added in 9d9c02ccd
. Let's remove it to clean things up a
bit.
Author: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://postgr.es/m/DD26NJ0Y34ZS.2ZOJPHSY12PFI@gmail.com
This commit is contained in:
@@ -2254,7 +2254,7 @@ set_dummy_rel_pathlist(RelOptInfo *rel)
|
||||
* return false.
|
||||
*/
|
||||
static bool
|
||||
find_window_run_conditions(Query *subquery, RangeTblEntry *rte, Index rti,
|
||||
find_window_run_conditions(Query *subquery, RangeTblEntry *rte,
|
||||
AttrNumber attno, WindowFunc *wfunc, OpExpr *opexpr,
|
||||
bool wfunc_left, bool *keep_original,
|
||||
Bitmapset **run_cond_attrs)
|
||||
@@ -2445,8 +2445,8 @@ find_window_run_conditions(Query *subquery, RangeTblEntry *rte, Index rti,
|
||||
* will use the runCondition to stop returning tuples.
|
||||
*/
|
||||
static bool
|
||||
check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Index rti,
|
||||
Node *clause, Bitmapset **run_cond_attrs)
|
||||
check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Node *clause,
|
||||
Bitmapset **run_cond_attrs)
|
||||
{
|
||||
OpExpr *opexpr = (OpExpr *) clause;
|
||||
bool keep_original = true;
|
||||
@@ -2485,7 +2485,7 @@ check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Index rti,
|
||||
TargetEntry *tle = list_nth(subquery->targetList, var1->varattno - 1);
|
||||
WindowFunc *wfunc = (WindowFunc *) tle->expr;
|
||||
|
||||
if (find_window_run_conditions(subquery, rte, rti, tle->resno, wfunc,
|
||||
if (find_window_run_conditions(subquery, rte, tle->resno, wfunc,
|
||||
opexpr, true, &keep_original,
|
||||
run_cond_attrs))
|
||||
return keep_original;
|
||||
@@ -2498,7 +2498,7 @@ check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Index rti,
|
||||
TargetEntry *tle = list_nth(subquery->targetList, var2->varattno - 1);
|
||||
WindowFunc *wfunc = (WindowFunc *) tle->expr;
|
||||
|
||||
if (find_window_run_conditions(subquery, rte, rti, tle->resno, wfunc,
|
||||
if (find_window_run_conditions(subquery, rte, tle->resno, wfunc,
|
||||
opexpr, false, &keep_original,
|
||||
run_cond_attrs))
|
||||
return keep_original;
|
||||
@@ -2622,7 +2622,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel,
|
||||
* runCondition.
|
||||
*/
|
||||
if (!subquery->hasWindowFuncs ||
|
||||
check_and_push_window_quals(subquery, rte, rti, clause,
|
||||
check_and_push_window_quals(subquery, rte, clause,
|
||||
&run_cond_attrs))
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user