Skip to content

add examples for duration and period granularities#1832

Merged
himanshug merged 1 commit intoapache:masterfrom
guobingkun:improve_granularity_doc
Oct 21, 2015
Merged

add examples for duration and period granularities#1832
himanshug merged 1 commit intoapache:masterfrom
guobingkun:improve_granularity_doc

Conversation

@guobingkun
Copy link
Copy Markdown
Contributor

add examples for duration and period granularities

@guobingkun guobingkun force-pushed the improve_granularity_doc branch from f8a3954 to 538696a Compare October 16, 2015 15:07
@rasahner
Copy link
Copy Markdown
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
Copy Markdown
Member

pjain1 commented Oct 16, 2015

👍

@guobingkun guobingkun force-pushed the improve_granularity_doc branch from 538696a to 930ecb5 Compare October 16, 2015 16:11
@xvrl
Copy link
Copy Markdown
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
Copy Markdown
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 guobingkun force-pushed the improve_granularity_doc branch from 930ecb5 to 26e0b58 Compare October 16, 2015 16:31
@guobingkun
Copy link
Copy Markdown
Contributor Author

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

@guobingkun guobingkun force-pushed the improve_granularity_doc branch from 26e0b58 to 6a30e19 Compare October 16, 2015 16:41
@rasahner
Copy link
Copy Markdown
Contributor

Thanks. LGTM.

@drcrallen
Copy link
Copy Markdown
Contributor

👍

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@guobingkun guobingkun force-pushed the improve_granularity_doc branch from 6a30e19 to 4030908 Compare October 21, 2015 16:20
@guobingkun guobingkun force-pushed the improve_granularity_doc branch from 4030908 to 2de5e9c Compare October 21, 2015 16:23
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