-
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
[feature request] selectors (e.g. min, max, first, last) should have equivalents to return the actual point #1577
Comments
Shouldn't |
@dgnorton yeah, makes more sense |
This can actually just be changed to be something like this: SELECT max(value), time, host FROM CPU Then in the return we'd end up getting the time of the actual point and the host. |
+1 |
Issue #3407 has more detail on which combinations are valid and which aren't. |
+1 |
+1. What i need is to do a group by tag and get the first and last times they were recorded. |
@corylanou this is listed in the 0.9.5 CHANGELOG as a fixed bug, but the issue is still open and I don't see a recent PR referenced here. What's the status? |
@beckettsean this was completed in #4202 |
Hi, I still get a bug with LAST(*) on
Same value, but bad timestamp :) (same error if add a group by) |
@skapin can you open a new issue and @mention me on it? I don't want to add onto old issues with something new. |
@jsternberg A link to this new issue would be helpful here... |
Right now the min, max, first, and last aggregate functions return values with timestamps set at the time bucket. For instance if you do
All you'd get out of that query is 10 data points with a timestamp on 10m increments and whatever the value is. What people actually want to know is what was the raw point that the max value corresponds to.
That is, what timestamp, and what other tag information is there. Ideally, that other information would be represented as columns in the result. So I'm thinking of something like:
The idea is that the
maxPointWithTags
function would take one or more arguments. The first argument is the field that is used for the max calculations. The following n arguments are the tags and fields that we'd like returned in the result.Ideally, we'd have this
Point
function for all of those other aggregates where it makes sense like min, max, first, and last since each of those can be mapped to a single data point.The text was updated successfully, but these errors were encountered: