This is an automated email from the ASF dual-hosted git repository.

frankchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new a544aff761 Document missed simple granularities (#12768)
a544aff761 is described below

commit a544aff7618460b2e7d74a9576f421a7197fde14
Author: Frank Chen <[email protected]>
AuthorDate: Thu Jul 14 14:02:28 2022 +0800

    Document missed simple granularities (#12768)
    
    * Document missed simple granularities
    
    * Update docs/querying/granularities.md
    
    Co-authored-by: Victoria Lim <[email protected]>
    
    * Update docs/querying/granularities.md
    
    Co-authored-by: Victoria Lim <[email protected]>
    
    Co-authored-by: Victoria Lim <[email protected]>
---
 .../util/common/granularity/GranularityType.java   |  3 +++
 docs/querying/granularities.md                     | 26 ++++++++++++++++++----
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git 
a/core/src/main/java/org/apache/druid/java/util/common/granularity/GranularityType.java
 
b/core/src/main/java/org/apache/druid/java/util/common/granularity/GranularityType.java
index e296747657..b4b7839060 100644
--- 
a/core/src/main/java/org/apache/druid/java/util/common/granularity/GranularityType.java
+++ 
b/core/src/main/java/org/apache/druid/java/util/common/granularity/GranularityType.java
@@ -28,6 +28,9 @@ import org.joda.time.chrono.ISOChronology;
 /**
  * Only to create a mapping of the granularity and all the supported file 
patterns
  * namely: default, lowerDefault and hive.
+ *
+ * NOTE:
+ * When a new granularity type is added to following type, DO remember 
document it here: docs/querying/granularities.md#simple-granularities
  */
 public enum GranularityType
 {
diff --git a/docs/querying/granularities.md b/docs/querying/granularities.md
index 1b527944e3..4ca12bb341 100644
--- a/docs/querying/granularities.md
+++ b/docs/querying/granularities.md
@@ -38,10 +38,28 @@ You can specify a time period as a 
[simple](#simple-granularities) string, as a
 
 Simple granularities are specified as a string and bucket timestamps by their 
UTC time (e.g., days start at 00:00 UTC).
 
-Supported granularity strings are: `all`, `none`, `second`, `minute`, 
`fifteen_minute`, `thirty_minute`, `hour`, `day`, `week`, `month`, `quarter` 
and `year`.
-
-* `all` buckets everything into a single bucket
-* `none` does not bucket data (it actually uses the granularity of the index - 
minimum here is `none` which means millisecond granularity). Using `none` in a 
[TimeseriesQuery](../querying/timeseriesquery.md) is currently not recommended 
(the system will try to generate 0 values for all milliseconds that didn’t 
exist, which is often a lot).
+Druid supports the following granularity strings: 
+  - `all`
+  - `none`
+  - `second`
+  - `minute`
+  - `five_minute`
+  - `ten_minute`
+  - `fifteen_minute`
+  - `thirty_minute`
+  - `hour`
+  - `six_hour`
+  - `eight_hour`
+  - `day`
+  - `week`
+  - `month`
+  - `quarter` 
+  - `year`
+
+The minimum and maximum granularities are `none` and `all`, described as 
follows:
+* `all` buckets everything into a single bucket.
+* `none` does not mean zero bucketing. It buckets data to millisecond 
granularity—the granularity of the internal index. You can think of `none` as 
equivalent to `millisecond`.
+  > Do not use `none` in a [timeseries query](../querying/timeseriesquery.md); 
Druid fills empty interior time buckets with zeroes, meaning the output will 
contain results for every single millisecond in the requested interval.
 
 #### Example:
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to