OLAP-style unoptimized moving window following aggregate

If _drop_value_extfn function is not supplied, this moving window sum is evaluated through the following calling pattern. This case is similar to the previous moving window example, but the row being evaluated is not the last row given by next value function.

Query

select b, my_sum(a) over (partition by b rows between 1 preceding and 1 following) 
from t

Calling pattern

_start_extfn(cntxt)
_reset_extfn(cntxt)
_next_value_extfn(cntxt, args)	 	input a=1	
_next_value_extfn(cntxt, args)  	input a=2
_evaluate_extfn(cntxt, args)    	returns 3
_reset_extfn(cntxt)
_next_value_extfn(cntxt, args)  	input a=1
_next_value_extfn(cntxt, args)  	input a=2
_next_value_extfn(cntxt, args)  	input a=3
_evaluate_extfn(cntxt, args)    	returns 6
_reset_extfn(cntxt)
_next_value_extfn(cntxt, args)  	input a=2
_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	
_next_value_extfn(cntxt, args)  	input a=5
_evaluate_extfn(cntxt, args)    	returns 9
_reset_extfn(cntxt)
_next_value_extfn(cntxt, args)  	input a=4
_next_value_extfn(cntxt, args)  	input a=5
_next_value_extfn(cntxt, args)  	input a=6
_evaluate_extfn(cntxt, args)    	returns 15
_reset_extfn(cntxt)
_next_value_extfn(cntxt, args)  	input a=5
_next_value_extfn(cntxt, args)  	input a=6
_evaluate_extfn(cntxt, args)    	returns 11
_finish_extfn(cntxt)

Result

b,  my_sum(a)
1,  3
1,  6
1,  5
2,  9
2,  15
2,  11