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

Function window_first_value

src/backend/utils/adt/windowfuncs.c:406–420  ·  view source on GitHub ↗

* first_value * return the value of VE evaluated on the first row of the * window frame, per spec. */

Source from the content-addressed store, hash-verified

404 * window frame, per spec.
405 */
406Datum
407window_first_value(PG_FUNCTION_ARGS)
408{
409 WindowObject winobj = PG_WINDOW_OBJECT();
410 Datum result;
411 bool isnull;
412
413 result = WinGetFuncArgInFrame(winobj, 0,
414 0, WINDOW_SEEK_HEAD, true,
415 &isnull, NULL);
416 if (isnull)
417 PG_RETURN_NULL();
418
419 PG_RETURN_DATUM(result);
420}
421
422/*
423 * last_value

Callers

nothing calls this directly

Calls 1

WinGetFuncArgInFrameFunction · 0.85

Tested by

no test coverage detected