@ -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 ) )
{
/*