-
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
fix derivative bug: #3247 #5733
Conversation
@sharang So this is essentially moving the start time back one interval only for derivative in CQs? This might need to fixed in the query engine itself. @jsternberg Thoughts? |
It might be reasonable to have all derivatives do this, even ad-hoc queries. If we did that, the query engine itself would have to be modified. Just at a glance, this would likely end up fixing it for continuous queries. It would end up causing a single datapoint older than the resample duration to be considered as part of the end result even though I'm not sure it matters. |
I think this should go in the query engine so that the query returns the same results regardless of where its run. |
Looking at this a bit more, there seem to be more problems with derivatives in continuous queries. I tried running a simple query with a raw derivative and got this from the validation.
The error message is not the best as the error message should be
It looks like I added this validation as part of fixing #5286. Even if we removed the group by, the continuous query service just wouldn't run the query since it exits early if you try to have the group by be zero. It looks like older versions could handle this fine so we probably broke the validation at some point. I'm currently looking into where it is broken. @jwilder should we be allowing a |
@jsternberg Yes, you need a |
@jwilder I think start-time 'moving' should only in CQ. Since in CQ, it implies that there is another point before the start-time, but in a query, user only requesting results which are calculated using points between start-time and end-time, query engine should not change the start-time. |
@jwilder @jsternberg change query engine will make user confuse, |
@jwilder @jsternberg so, what's next? |
@sharang I think we're going to revisit derivatives for 0.12 after examining what we think the output should be for these kinds of calls. At the moment, this PR wouldn't resolve the issue as the query within the fixed issue doesn't even work anymore when attempting to create a continuous query as mentioned in a previous comment of mine. When I have time to write up a more detailed description of the problem, I'll link it here so you can be included in the discussion. |
I'm closing this since I'm working on a different fix and we're not going to do this by modifying the continuous querier. Thanks for your help. |
@jwilder
submit to
master