-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Implement derivatives across intervals for aggregate queries #6103
Conversation
Also @nathanielc since this changes a public API that may be used by Kapacitor. |
@jsternberg The API change is OK with me. |
@jsternberg Overall, lgtm. Can youc comment the |
67be74a
to
5e27f27
Compare
5e27f27
to
338e9a5
Compare
I removed the This should now work for all aggregate queries. |
@jsternberg will you merge it into 0.12? |
@sharang unfortunately 0.12 has already been released and this wasn't ready in time to make feature cutoff. It's currently awaiting review and will likely go into 0.13 when we release that. |
a94a45a
to
bd3deeb
Compare
@jsternberg is anything else needed on this, or are you just waiting for some upvotes? |
Just waiting. This should work for aggregate queries which should alleviate at least some of the pain from this. |
bd3deeb
to
ddeedc7
Compare
this seems good to me, though i'd like @benbjohnson to get some eyes on it since i'm not the most capable assessor of query engine changes |
oh, ben already looked at it. i guess it's good to merge? 👍 |
It could use another look. @benbjohnson reviewed an older version of this. |
ddeedc7
to
130bc25
Compare
👍 |
For aggregate queries, derivatives will now alter the start time to one interval behind and will use that interval to find the derivative of the first point instead of giving no value for that interval. Null values will still be discarded so if the interval before the one you are querying is null, then it will be discarded like if it were in the middle of the query. You can use `fill(0)` to fill in these values. This does not apply to raw queries yet. Also modified the derivative and difference aggregates to use the stream iterator instead of the reduce slice iterator for space efficiency. Fixes #3247. Contributes to #5943.
130bc25
to
86046bb
Compare
For aggregate queries, derivatives will now alter the start time to one
interval behind and will use that interval to find the derivative of the
first point instead of giving no value for that interval.
This does not apply to raw queries yet.
Fixes #3247. Contributes to #5943.