influxdb/influxdb — pull request #1257 by benbjohnson (2014-12-21 20:29:21+00:00)
Title: Add tag filtering

## Overview

This pull request adds simple equality-based tag filtering via the `WHERE` clause.

## Example

```
SELECT sum(value) FROM cpu GROUP BY time(1h), host WHERE region = 'us-west'
```

## Notes

This change only performs very simple `tag = "value"` equality checks. It doesn't support inequality (`<>`). It doesn't support multiple values (`(region = 'us-west' OR region = 'us-east')`).

I also need to refactor the extraction code. I've hit a couple places where I want to combine a `Walk()` with a replace but the current `Walk()` function doesn't allow for that. I want to have some kind of walk-and-replace but I didn't want to conflate this PR with that.