-
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
introduce a new function non_negative_difference #8235
introduce a new function non_negative_difference #8235
Conversation
45eb48d
to
83453c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbetts should this be added to be merged into 1.3?
influxql/functions.go
Outdated
@@ -216,6 +218,12 @@ func (r *FloatDifferenceReducer) Emit() []FloatPoint { | |||
// Calculate the difference of successive points. | |||
value := r.curr.Value - r.prev.Value | |||
|
|||
// if its non_negative_difference discard any negative value. Since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you modify this comment to use proper capitalization and fix the typo in makred
to marked
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
influxql/parser_test.go
Outdated
@@ -314,6 +314,56 @@ func TestParser_ParseStatement(t *testing.T) { | |||
}, | |||
}, | |||
|
|||
// non_negtative_difference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another typo here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Can you rebase to a single commit and update the changelog? Then I'll double check that this is OK to merge and hopefully have it done before the end of the day. |
2f30b9b
to
232fdae
Compare
@jsternberg Done. |
Thanks! |
Required for all non-trivial PRs