-
Notifications
You must be signed in to change notification settings - Fork 62
Description
What type of enhancement is this?
API improvement
What subsystems and features will be improved?
Continuous aggregate
What does the enhancement do?
When you have timeseries (time, value) pairs that needs to be seen as a continuous value with LOCF interpolation, an aggregate based on time_weight
does not produce the desired result since it does not fetch the value before the the begining of the bucket. This is especially noticeable when the aggregation interval is relatively close to the larger intervals between samples.
Implementation challenges
The only workaround I can think of is to use the continuous aggregates to produce the "nearly correct" result and then create a view on top of it that fetches the necessary data-point from before the bucket. However - although I've not tested it - I suspect this will a bit slow since for every aggregate point I still have to go through a non-aggregate index and heap to find one more row.