In the “OLAP-style optimized moving window aggregate” section, the calling pattern is currently documented as:
_start_extfn(cntxt) _reset_extfn(cntxt) _next_value_extfn(cntxt, args) -- input a=1 _evaluate_extfn(cntxt, args) -- returns 1 _next_value_extfn(cntxt, args) -- input a=2 _evaluate_extfn(cntxt, args) -- returns 3 _drop_value_extfn(cntxt) -- input a=1 _next_value_extfn(cntxt, args) -- input a=3 _evaluate_extfn(cntxt, args) -- returns 5 _reset_extfn(cntxt) _next_value_extfn(cntxt, args) -- input a=4 _evaluate_extfn(cntxt, args) -- returns 4 _next_value_extfn(cntxt, args) -- input a=5 _evaluate_extfn(cntxt, args) -- returns 9 _drop_value_extfn(cntxt) -- input a=4 _next_value_extfn(cntxt, args) -- input a=6 _evaluate_extfn(cntxt, args) -- returns 11 _finish_extfn(cntxt)
The calling pattern would be called as:
_start_extfn(cntxt) _reset_extfn(cntxt) _evaluate_aggregate_extfn(cntxt, args) -- returns 1 _evaluate_aggregate_extfn(cntxt, args) -- returns 3 _drop_value_extfn(cntxt) -- input a=1 _next_value_extfn(cntxt, args) -- input a=3 _evaluate_aggregate_extfn(cntxt, args) -- returns 5 _reset_extfn(cntxt) _next_value_extfn(cntxt, args) -- input a=4 _evaluate_aggregate_extfn(cntxt, args) -- returns 4 _next_value_extfn(cntxt, args) -- input a=5 _evaluate_aggregate_extfn(cntxt, args) -- returns 9 _drop_value_extfn(cntxt) -- input a=4 _next_value_extfn(cntxt, args) -- input a=6 _evaluate_aggregate_extfn(cntxt, args) -- returns 11 _finish_extfn(cntxt)