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

Fixing bucket alignment for group by #2016

Merged
merged 3 commits into from
Mar 19, 2015
Merged

Fixing bucket alignment for group by #2016

merged 3 commits into from
Mar 19, 2015

Conversation

jnutzmann
Copy link

This addresses issue #2005

It makes sure the buckets land on natural boundaries. If the minimum time specified falls in the middle of a bucket, it returns bucket, but only data after the minimum time.

@otoolep
Copy link
Contributor

otoolep commented Mar 19, 2015

Thanks @jnutzmann -- the test suite failed however. Can you dig into that? You can find the test output on the "Details" link above, and you can also run the tests manually too, of course.

@jnutzmann
Copy link
Author

Yup. Already have a fix that I am working on. Seems like there are two issues. First in how it calculates the number of points to return and also in the expected result (should return a bucket with null). I'll update my branch shortly.

@otoolep
Copy link
Contributor

otoolep commented Mar 19, 2015

Great.

You must also sign the CLA, if you have not already done so.

@pauldix

@jnutzmann
Copy link
Author

I signed the CLA this morning.

As far as the change to the test goes, I believe the previous expected result was incorrect, but I want to make sure you agree. The previous result placed the the point occurring at "2000-01-01T00:00:10Z" in the "2000-01-01T00:00:00Z" bucket when grouped by 10s. This should rather be in the "2000-01-01T00:00:10Z" bucket. We get null for the "2000-01-01T00:00:00Z" bucket, since the previous point occurs at "2000-01-01T00:00:00Z" and we limit to "2000-01-01T00:00:05Z" in the query.

Seem correct?

@toddboom
Copy link
Contributor

@jnutzmann I'm check on this now. Your logic makes sense - I'll verify and let you know.

@otoolep
Copy link
Contributor

otoolep commented Mar 19, 2015

Unit test changes look good to me -- thanks @jnutzmann. +1 on this change.

otoolep added a commit that referenced this pull request Mar 19, 2015
@otoolep otoolep merged commit b148f3d into influxdata:master Mar 19, 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

Successfully merging this pull request may close these issues.

None yet

3 participants