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

Missing WHERE time clause error on continuous queries #2944

Closed
toomanyjmikes opened this issue Jun 11, 2015 · 2 comments
Closed

Missing WHERE time clause error on continuous queries #2944

toomanyjmikes opened this issue Jun 11, 2015 · 2 comments
Assignees
Milestone

Comments

@toomanyjmikes
Copy link

I'm creating this continuous query (stolen from your documentation):

CREATE CONTINUOUS QUERY c1h ON cqtest BEGIN SELECT COUNT(name) INTO clicksCount_1h FROM clicks GROUP BY time(1h) END

and am getting a error message (repeated once per second) like:

[continuous_querier] 2015/06/11 13:40:24 error executing query: SELECT count(name) INTO "cqtest"."default".clicksCount_1h FROM "cqtest"."default".clicks GROUP BY time(1h): err = aggregate functions with GROUP BY time require a WHERE time clause

I've reproduced this using 0.9.0rc33 on OS X and 0.9.0-1 final on Centos.

Program that creates db, cq and populates with a little data at https://gist.github.com/toomanyjmikes/a92a1521d1a95ee9c7e3#file-cq_where_time_error-py

@mahuika88
Copy link

I'm seeing this too. this is the I'm using query on 0.9.0:
create continuous query agg_cpu on collectd begin select sum(value) into "cpu" from "cpu_value" where type_instance =~ /(system|user|nice|wait|interrupt|softirq|steal)/ group by time(10s) end

Seeing this error:
[continuous_querier] 2015/06/12 17:10:40 error executing query: SELECT sum(value) INTO "collectd"."default".cpu FROM "collectd"."default".cpu_value WHERE type_instance =~ /(system|user|nice|wait|interrupt|softirq|steal)/ GROUP BY time(10s): err = aggregate functions with GROUP BY time require a WHERE time clause

@beckettsean beckettsean added this to the 0.9.1 milestone Jun 12, 2015
@beckettsean
Copy link
Contributor

Thanks, @toomanyjmikes @mahuika88 this is a definite change from the prior behavior and is easy to reproduce. We'll get with the core devs and find out if this was an accidental or intentional change to the CQ syntax and then update the docs appropriately.

@dgnorton dgnorton self-assigned this Jun 15, 2015
dgnorton added a commit that referenced this issue Jun 16, 2015
dgnorton added a commit that referenced this issue Jun 16, 2015
dgnorton added a commit that referenced this issue Jun 16, 2015
@otoolep otoolep assigned otoolep and unassigned dgnorton Jun 22, 2015
dgnorton added a commit that referenced this issue Jun 22, 2015
dgnorton added a commit that referenced this issue Jun 22, 2015
dgnorton added a commit that referenced this issue Jun 22, 2015
dgnorton added a commit that referenced this issue Jun 22, 2015
fix #2944: don't require WHERE time on create CQ
@dgnorton dgnorton removed the review label Jun 22, 2015
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

5 participants