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

add examples for duration and period granularities #1832

Merged
merged 1 commit into from
Oct 21, 2015

Conversation

guobingkun
Copy link
Contributor

add examples for duration and period granularities

@rasahner
Copy link
Contributor

Thanks for the examples.

While you're in this file, perhaps you could add a period at the end of the sentence "Supported granularity strings are: ..."

Also, it would be nice (and more consistent) to provide an example under "Simple Granularities" like the ones for the other granularity types. That might help show why the specification is described as being given by a string or an object - I was initially confused about what "object" means in this context.

@pjain1
Copy link
Member

pjain1 commented Oct 16, 2015

👍

@xvrl
Copy link
Member

xvrl commented Oct 16, 2015

+1 for adding examples to the other "simple" granularity types. Alternatively, you can just indicate what the string types are equivalent to (except none and all for which it doesn't really make sense to give the object form)

@drcrallen
Copy link
Contributor

As a general note in case some DEV stumbles here later, io.druid.segment.incremental.IncrementalIndex#getInterval currently does this.gran.next(this.getMaxTimeMillis()) to find the end time. As such, if you have ALL query granularity getInterval() will return an interval whose end time is JodaUtils.MAX_INSTANT

Found that one the hard way the other day.

@guobingkun
Copy link
Contributor Author

Done adding the period and adding examples to "simple" granularity.

@rasahner
Copy link
Contributor

Thanks. LGTM.

@drcrallen
Copy link
Contributor

👍

}
],
"intervals":[
"2000-01-01T00:00Z/3000-01-01T00:00Z"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change the interval also to America/Los_Angeles timezone? that would be the common use case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

himanshug added a commit that referenced this pull request Oct 21, 2015
add examples for duration and period granularities
@himanshug himanshug merged commit 8dd30e6 into apache:master Oct 21, 2015
@guobingkun guobingkun deleted the improve_granularity_doc branch October 21, 2015 18:13
@gianm gianm added this to the 0.9.0 milestone Nov 7, 2015
@guobingkun guobingkun mentioned this pull request Dec 1, 2015
@gianm gianm modified the milestones: 0.8.3, 0.9.0 Dec 1, 2015
@gianm gianm mentioned this pull request Dec 4, 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.

7 participants