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

Function are_peers

src/backend/executor/nodeWindowAgg.c:3306–3320  ·  view source on GitHub ↗

* are_peers * compare two rows to see if they are equal according to the ORDER BY clause * * NB: this does not consider the window frame mode. */

Source from the content-addressed store, hash-verified

3304 * NB: this does not consider the window frame mode.
3305 */
3306static bool
3307are_peers(WindowAggState *winstate, TupleTableSlot *slot1,
3308 TupleTableSlot *slot2)
3309{
3310 WindowAgg *node = (WindowAgg *) winstate->ss.ps.plan;
3311 ExprContext *econtext = winstate->tmpcontext;
3312
3313 /* If no ORDER BY, all rows are peers with each other */
3314 if (node->ordNumCols == 0)
3315 return true;
3316
3317 econtext->ecxt_outertuple = slot1;
3318 econtext->ecxt_innertuple = slot2;
3319 return ExecQualAndReset(winstate->ordEqfunction, econtext);
3320}
3321
3322/*
3323 * window_gettupleslot

Callers 6

row_is_in_frameFunction · 0.85
update_frameheadposFunction · 0.85
update_frametailposFunction · 0.85
update_grouptailposFunction · 0.85
ExecWindowAggFunction · 0.85
WinRowsArePeersFunction · 0.85

Calls 1

ExecQualAndResetFunction · 0.85

Tested by

no test coverage detected