Skip to content
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

first() and last() return wrong time with the value #4294

Closed
prashleo opened this issue Oct 1, 2015 · 1 comment
Closed

first() and last() return wrong time with the value #4294

prashleo opened this issue Oct 1, 2015 · 1 comment

Comments

@prashleo
Copy link

prashleo commented Oct 1, 2015

I have time series named 'sla' with only 2 time ranges.
below query, returns 2 value for each group by:

select value from sla where machine='120' and parent='machine' group by resource_type

sla
resource_type:disk

time    value
2015-10-01T20:35:33Z    0
2015-10-01T20:42:28Z    0
sla
resource_type:nic

time    value
2015-10-01T20:35:33Z    0
2015-10-01T20:42:28Z    0

which is exactly what I expected.

But using last() which should return me 1 value in each group, which indeed it does
but with the wrong time '1970-01-01T00:00:00Z' instead of '2015-10-01T20:42:28Z'

`select last(value) from sla where machine='120' and parent='machine' group by resource_type

sla
resource_type:disk

time    last
1970-01-01T00:00:00Z    0
sla
resource_type:nic

time    last
1970-01-01T00:00:00Z    0

Thanks,
Prashanth

@beckettsean
Copy link
Contributor

duplicate of #1577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants