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

Expose similar Aggregate/Emit API from InfluxQL for Slice functions. #5902

Closed
wants to merge 1 commit into from

Conversation

nathanielc
Copy link
Contributor

The change does effectively the same as the previous refactor the reduce function but for the slice typed functions. Names get a little long and hard to read but I think it still clear what it going on.

The reason for even implementing these types is so that the state is stored on a reducer and the iterators become stateless. The statelessness of an iterator made composing various combination of int/float/etc simple. See the related Kapacitor PR influxdata/kapacitor#280

Q: The derivative function uses a local prev value that is supposed to carry over from window to window, but that was not isolated by group, now since a new reducer is created each time it is lost entirely. A custom reducer should fix it, but wondering if I should implement per group or leave it how it was. Relevant line https://github.com/influxdata/influxdb/blob/master/influxql/call_iterator.go#L933

  • CHANGELOG.md updated
  • Rebased/mergable
  • Tests pass
  • Sign CLA (if not already signed)

@nathanielc nathanielc force-pushed the nc-influxql-funcs branch 3 times, most recently from 8a67f1f to 6f18137 Compare March 4, 2016 18:04
@nathanielc
Copy link
Contributor Author

@benbjohnson @jsternberg How does this look? Any thoughts on the derivative issue?

@@ -19,6 +19,7 @@
- [#5691](https://github.com/influxdata/influxdb/pull/5691): Remove associated shard data when retention policies are dropped.
- [#5758](https://github.com/influxdata/influxdb/pull/5758): TSM engine stats for cache, WAL, and filestore. Thanks @jonseymour
- [#5844](https://github.com/influxdata/influxdb/pull/5844): Tag TSM engine stats with database and retention policy
- [#5902](https://github.com/influxdata/influxdb/pull/5902): Refactor query engine slice function to use a common interface for integration with Kapacitor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's any need to add a changelog. You're modifying code that's never been part of a release. I think this commit fits in with the general changelog of "query engine was completely refactored".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@nathanielc nathanielc closed this Mar 7, 2016
@nathanielc nathanielc deleted the nc-influxql-funcs branch March 7, 2016 22:58
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

Successfully merging this pull request may close these issues.

2 participants