{"action":"created","issue":{"url":"https://api.github.com/repos/linkedin/pinot/issues/48","labels_url":"https://api.github.com/repos/linkedin/pinot/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/linkedin/pinot/issues/48/comments","events_url":"https://api.github.com/repos/linkedin/pinot/issues/48/events","html_url":"https://github.com/linkedin/pinot/issues/48","id":105512483,"number":48,"title":"Grouping data by time interval","user":{"login":"jpbetz","id":523590,"avatar_url":"https://avatars.githubusercontent.com/u/523590?v=3","gravatar_id":"","url":"https://api.github.com/users/jpbetz","html_url":"https://github.com/jpbetz","followers_url":"https://api.github.com/users/jpbetz/followers","following_url":"https://api.github.com/users/jpbetz/following{/other_user}","gists_url":"https://api.github.com/users/jpbetz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpbetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpbetz/subscriptions","organizations_url":"https://api.github.com/users/jpbetz/orgs","repos_url":"https://api.github.com/users/jpbetz/repos","events_url":"https://api.github.com/users/jpbetz/events{/privacy}","received_events_url":"https://api.github.com/users/jpbetz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-09T03:41:33Z","updated_at":"2015-09-09T18:01:41Z","closed_at":null,"body":"I've been working on adding Pinot as a datasource to Grafana, a visualization tool for time series charts.\r\n\r\nI'm looking for the the best way to query Pinot.\r\n\r\nIn InfluxDB's query language, grouping results into time buckets is usually done like:\r\n\r\n```\r\nSELECT MEAN(value) FROM measure WHERE time > (now() - 1h) GROUP BY time(5m)\r\n```\r\n\r\nWhere the result set would look something like\r\n\r\n```\r\n{\r\n  \"columns\": [\"value\", \"time\"],\r\n  \"results\": [\r\n    [40,1441756680100],\r\n    [45,1441756680200],\r\n    [43,1441756680300],\r\n    ...\r\n  ]\r\n}\r\n```\r\nAnd can easily be plotted.\r\n\r\nDoes Pinot support this sort of query?  I've been trying a few group by queries but have been unable to formulate one that provides this sort of grouped response.  If this is not yet supported, would it be possible to add support?"},"comment":{"url":"https://api.github.com/repos/linkedin/pinot/issues/comments/138991412","html_url":"https://github.com/linkedin/pinot/issues/48#issuecomment-138991412","issue_url":"https://api.github.com/repos/linkedin/pinot/issues/48","id":138991412,"user":{"login":"jpbetz","id":523590,"avatar_url":"https://avatars.githubusercontent.com/u/523590?v=3","gravatar_id":"","url":"https://api.github.com/users/jpbetz","html_url":"https://github.com/jpbetz","followers_url":"https://api.github.com/users/jpbetz/followers","following_url":"https://api.github.com/users/jpbetz/following{/other_user}","gists_url":"https://api.github.com/users/jpbetz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpbetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpbetz/subscriptions","organizations_url":"https://api.github.com/users/jpbetz/orgs","repos_url":"https://api.github.com/users/jpbetz/repos","events_url":"https://api.github.com/users/jpbetz/events{/privacy}","received_events_url":"https://api.github.com/users/jpbetz/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T18:01:41Z","updated_at":"2015-09-09T18:01:41Z","body":"If you're curious.  Here's a (not yet working) Grafana pinot datasource:\r\n\r\nhttps://github.com/coursera/grafana/tree/pinot-datasource/public/app/plugins/datasource/pinot\r\n\r\nIt's based on the InfluxDB datasource.  The main thing it's missing is the query we've been discussing.  Once supported, I would simply modify this:\r\n\r\nhttps://github.com/coursera/grafana/blob/pinot-datasource/public/app/plugins/datasource/pinot/queryBuilder.js#L60\r\n\r\nAnd we'd have basic Grafana support."}}