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

CQs with offset in GROUP BY clause run at original time, not offset time #7025

Closed
beckettsean opened this issue Jul 18, 2016 · 2 comments
Closed
Assignees
Milestone

Comments

@beckettsean
Copy link
Contributor

Bug report

System info: [Include InfluxDB version, operating system name, and other relevant details]

InfluxDB 0.13+

Steps to reproduce:
Actual behavior: [What actually happened]

If a CQ is set up with an offset in the GROUP BY clause, the CQ will execute the query with the proper offset, but the query will be scheduled without respect to the offset. For example, a CQ with the clause GROUP BY time(1d, 3h) will run at 00:00 UTC but the WHERE time clause will start at 03:00 UTC and end at 02:59 UTC the following day.

Expected behavior: [What you expected to happen]

As a user, I would expect the CQ to execute at 03:00 if I have an offset in the GROUP BY.

@jsternberg
Copy link
Contributor

Is the offset positive or negative? So if it runs at 00:00 on 01/01/2000, will it start at 03:00 on 01/01/2000 or 12/31/1999? It seems like it shouldn't be going into the future...

I'm looking at this now.

@beckettsean
Copy link
Contributor Author

Offset is positive. GROUP BY time(1h,5m) will start buckets at xx:05 rather than xx:00. GROUP BY time(1h,-5m) will start the buckets at xx:55.

In your example, with the current behavior, the CQ will kick off at 00:00 to query from 03:00 01/01 until 03:00 01/02

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

No branches or pull requests

2 participants