influxdb/influxdb — pull request #1232 by benbjohnson (2014-12-15 18:35:58+00:00)
Title: Add time range extraction and interval grouping support to execution engine.

## Overview

This pull request adds support for extracting the time range from an expression and then applying that to the interval synchronization within the processors. tl;dr the start and (optionally) end time range of the query is extracted and used for the iterators passed to each mapper so they can emit values on the same intervals (even if there aren't actually data points in those intervals).

## Example

This PR includes support for interval group by statements with a time range:

```
SELECT sum(value)
FROM cpu
WHERE time >= now() - 3h AND time < now()
GROUP BY time(30m)
```

## Notes

There will be more changes once full group by support is added (e.g. n-number of tag dimensions).

I moved some notes I made with Paul to the `NOTES` file. I'll remove it once the execution engine is done. Don't bother reading through it. It won't make any sense. :)