rixed / ramen

A stream processing language and compiler for small-scale monitoring
Other
14 stars 4 forks source link

Need a `previous` variable that's the previous output of the current group #1416

Closed rixed closed 2 years ago

rixed commented 2 years ago

Currently, previous means the last output value (including from another group). This is not useful for computing diffs. (It can be useful for commit conditions though, although there are no known cases of group by operations with a previous that really means the global previous) (LAG cannot be used for diffs either, because it would return the last incoming value into the group.)

But then what to do with the group once the value is output? If we delete it we lose the previous value, but we cannot hold on to it forever either.