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

Continuous queries syntax change #526

Closed
richthegeek opened this issue May 11, 2014 · 4 comments
Closed

Continuous queries syntax change #526

richthegeek opened this issue May 11, 2014 · 4 comments

Comments

@richthegeek
Copy link
Contributor

I suggest a change to how continuous queries are created, and possibly managed.

The changes are as follows:

  1. CQs are identified by the CONTINUOUSLY param, instead of by the INTO param
  2. The INTO query now simply redirects output to a second series (similar to MongoDB's $out
  3. The CONTINUOUSLY param can work on DELETE queries as well, and the mode of identifying CQ deletes is consistent.
  4. The CONTINUOUSLY param can be followed by AS :identifer to solve issue Named Continuous Queries #525 in a manner consistent with existing language.

Whilst this would be a breaking change, I believe it's a clearer syntax and provides multiple benefits.

An example of a query utilising these keywords
SELECT sum(value) FROM orders GROUP BY time(1d) INTO daily_order_totals CONTINUOUSLY AS daily_order_totals

@pauldix
Copy link
Member

pauldix commented May 11, 2014

I think the delete queries would be better served through #479 (other scheduling options for continuous queries). Those same scheduling options could be applied to deletes. I guess the continuously keyword would be one of the scheduling options.

Not sure about this one. Wonder what other people think about it.

@jvshahid
Copy link
Contributor

I like the idea. Don't think delete queries belong here. Initially to make this backward compatible we can provide a config option for comparability mode. Also, query identifier should be optional with a default of cq<unique number>, where `unique number is an auto incrementing number consistent across all nodes, using raft or other means.

@jvshahid
Copy link
Contributor

Oops, referenced the wrong issue

@jvshahid jvshahid reopened this May 13, 2014
@richthegeek
Copy link
Contributor Author

Closed it by accident a second time?

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

No branches or pull requests

3 participants