-
Notifications
You must be signed in to change notification settings - Fork 490
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
derivative node returns value from the future #1329
Comments
Another issue I just encountered with the
Actual:
Due to the original issue this was opened for, I expected a couple different things, but this output was not one of them. I can't make sense of what's going on here. Obviously we have a point where the |
@phemmer Looking through your examples I agree the actual behavior is quite confusing. We will take a look at the best way to fix this while minimizing any breaking changes to existing behavior. |
I actually started work on this. Basically I just adjusted it so that the derivative is added to the latter point, not the former one, and the first point in the stream/batch is dropped (currently in batch the last point is dropped). |
Go ahead a put up a PR on what you have, we can start the discussion from there. Your solution sounds like what I was thinking. |
The
derivative()
node computes the derivative between a point, and the one that follows it, but adds the calculated derivative value to the first point, not the second.This is counterintuitive as this is not how a derivative is defined, nor is it how InfluxDB's derivative behaves.
Additionally the behavior results in the
derivative()
node buffering a point. If it behaved as expected, buffering would not be necessary.Expected:
Actual:
The text was updated successfully, but these errors were encountered: