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.
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 aprevious
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.