I have a method that is invoked in the query. However it is only run once, but the listener outputs two null events assuming i send 10 events.
select method() from Event.win:length_batch(5)
The result from the listener: this is correct since the method dosent return anything, but the method only fires once when it should fire twice.
{method()=null}
{method()=null}
Does anyone know why? I want the mthod to be run every time the window is filled up with 5 events as you see above the window is filled twice, but my method is only fired once.
Basically I want the method to run multiple times like avg() etc but it is only run once.
Read this one in the docs: 16.4.24.3. User-Defined Function or Static Method Cache
By default Esper caches the result of an user-defined function if the parameter set to that function is empty or all parameters are constant values.