-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Unexpected time_bucket_gapfill behavior (with locf and last) #6528
Comments
Hello @jflambert, thank you for reaching out. This is the output of time_bucket_gapfill without locf:
so I think the results that you get are consistent with gapfill/locf behavior, but I understand this is not what you are looking for. |
Hi @konskov so you confirm that I'm not doing anything wrong and that this is expected behavior. Yes I would like an option such that each bucket represents a "final" state of the previous one. Here's my current alternative. Basically I want to round up timestamps to the next minute, unless they are exactly a given minute. Then I reduce to one row with a
|
@jflambert I am going to relabel this as a feature request if you don't mind. |
@jflambert Actually, if you could open a new issue with a feature request that would be better. Then I'll close this issue and link to it from the new feature request for the records. |
@erimatnor I will gladly do this shortly. However, I think having an offset could be what I'm looking for, and there are already 2 or 3 open feature requests? Anyway I'll open a new one with my specific use case and you can decide if there is overlap with the other ones. |
What type of bug is this?
Incorrect result
What subsystems and features are affected?
Gapfill
What happened?
I'm trying to "downsample" discrete readings with the
time_bucket_gapfill
andlocf
functions but I end up with unexpected results. Using the replication steps below I expect the red row to have 3 as a value. I want the bucket of the third minute to contain the last value in the previous minute, up until the third minute precisely. It seems to be doing the opposite and grabbing the last value in the third minute bucket.TimescaleDB version affected
2.13.1
PostgreSQL version used
15.5
What operating system did you use?
timescaledb-ha
What installation method did you use?
Docker
What platform did you run on?
On prem/Self-hosted
Relevant log output and stack trace
No response
How can we reproduce the bug?
The text was updated successfully, but these errors were encountered: