The time bucketing I have in mind is a feature supported by an existing SQL client for Druid, it would be used with GROUP BY:
https://github.com/implydata/plyql An example of it would be: plyql -h 10.20.30.40 -i P1D -q " SELECT SUM(tweet_length) as TotalTweetLength FROM twitterstream GROUP BY TIME_BUCKET(__time, PT1H, 'Etc/UTC') " The "GROUP BY TIME_BUCKET(__time, PT1H, 'Etc/UTC')" would be equivalent to specifying the following within the Druid query JSON: ... "granularity": {"type": "period", "period": "PT1H", "timeZone": "Etc/UTC"} ... On Fri, Oct 16, 2015 at 6:13 PM, Ted Dunning <[email protected]> wrote: > On Fri, Oct 16, 2015 at 4:33 PM, Jonathan Wei <[email protected]> wrote: > > > 2.) I would like to extend the SQL syntax with a new function for > > specifying the desired time bucketing properties for a Druid query, to be > > translated into "granularity": > > > > http://druid.io/docs/0.8.1/querying/granularities.html > > > > Can someone point me to a good resource or example for doing this in > > Calcite? > > > > Why is this not a group by operation? >
