-
Notifications
You must be signed in to change notification settings - Fork 117
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
Adding support for daylight savings time in timeseries queries #3494
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this PR look good to me.
For context for others, we found that just using time_bucket
and passing a time zone to it corrects for offsets, but still treats DST changes as separate bins (with the same labels), which is the behavior we decided we want (see Notion).
Two questions before this is ready to merge:
- @AdityaHegde, did you confirm this does not null-fill at DST changes (i.e. just skips the value instead)?
- @egor-ryashin, I did some testing and the Druid implementation (not changed in this PR) appears to already have the desired behavior. Is that also your impression?
Yes, it works for both. |
Update from @AdityaHegde:
|
I have fixed the duckdb query. Interval arithmetic didnt honour time zone. Looks like it is already working in druid. The UI test failure seem to be unrelated. It is testing formatting in leaderboards, this only changes timeseries. |
As an extra validation, I went ahead and did some further testing locally. Can confirm this should fix the customer reported issues as well. However, this fix won't address #3560 so we'll want to fix that separately. |
Note that #3560 is fixed from the API side in a previous commit. Had a debug session with @AndrewRTsao , the issue is in the formatter we use in the UI. Formatting seem to convert the UTC into another UTC with an offset leading to issues based on user's time zone. We should instead use Lets tackle the labelling issue separately. I have reverted the labelling changes in charts from this PR so that we can fix it together. |
@@ -114,3 +148,16 @@ func prepareEnvironment(b *testing.B) (*runtime.Runtime, string, *runtimev1.Metr | |||
mv := obj.GetMetricsView().Spec | |||
return rt, instanceID, mv | |||
} | |||
|
|||
func prepareEnvironmentSpending(b *testing.B) (*runtime.Runtime, string, *runtimev1.MetricsViewSpec) { | |||
rt, instanceID := testruntime.NewInstanceForProject(b, "spending") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not seeing this project anywhere?
Hey @egor-ryashin, some more questions about this PR:
|
|
|
…o timeseries-dst-support
* Adding support for DST in timeseries queries --------- Co-authored-by: egor-ryashin <riashin.egor@gmail.com> Co-authored-by: Egor Ryashin <egor.ryashin@rilldata.com> Co-authored-by: Rakesh Sharma <rakeshsharma14317@gmail.com>
* Adding support for DST in timeseries queries --------- Co-authored-by: egor-ryashin <riashin.egor@gmail.com> Co-authored-by: Egor Ryashin <egor.ryashin@rilldata.com> Co-authored-by: Rakesh Sharma <rakeshsharma14317@gmail.com> (cherry picked from commit edd0ac7)
* Adding support for DST in timeseries queries --------- Co-authored-by: egor-ryashin <riashin.egor@gmail.com> Co-authored-by: Egor Ryashin <egor.ryashin@rilldata.com> Co-authored-by: Rakesh Sharma <rakeshsharma14317@gmail.com> (cherry picked from commit edd0ac7)
first_day_of_week
giving incorrect results in the duckdb query. (Off by one day every other row) (@AdityaHegde )