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

window_aggregate sdk example #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

window_aggregate sdk example #4

wants to merge 4 commits into from

Conversation

esoroush
Copy link

WindowAggregate sdk example:
A WindowAggregate operator written by gl-sdk that accepts a BASE_AGGREGATE as an argument and does sliding window aggregation.

Any aggregate operator that inherits from BASE_AGGREGATE should provide implementation for the following methods in order to be used by WindowAggregate function:

- initiate()
- add_element()
- remove_element() (optional: if incremental computation is supported)
- emit()

Currently MIN,MAX,SUM,COUNT and AVG are implemented based on this framework.

queue->pop();
} else {
queue->pop();
std::queue<flexible_type> * queue2 = new std::queue<flexible_type>();
Copy link
Contributor

Choose a reason for hiding this comment

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

if you use std::list or std::deque, you can avoid creating a new queue here.

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

Successfully merging this pull request may close these issues.

3 participants