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

Throw parser error for invalid aggregate without where time #2542

Closed
corylanou opened this issue May 11, 2015 · 0 comments · Fixed by #2540
Closed

Throw parser error for invalid aggregate without where time #2542

corylanou opened this issue May 11, 2015 · 0 comments · Fixed by #2540
Assignees
Milestone

Comments

@corylanou
Copy link
Contributor

If you issue a query like so:

select count(value) from cpu group by time(1d)

It would effectively return an empty result set, but not error out.

Should error out with something like:

error parsing query: COUNT with GROUP BY time requires WHERE time clause

The correct syntax is to provide a WHERE with a time condition like so:

select count(value) from cpu where time > now() - 30d group by time(1d)
@toddboom toddboom changed the title Throw parser error for invalid count group without where time Throw parser error for invalid aggregate without where time May 11, 2015
@toddboom toddboom added this to the 0.9.0 milestone May 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants