Skip to content

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