ContinuumIO/blaze — pull request #353 by mrocklin (2014-06-26 00:37:43+00:00)
Title: Scalar coercion - Server selection

Two cute features that build up to a bigger feature.

Scalar expressions are comfortable coercing certain types

```python
>>> d = ScalarSymbol('d', 'datetime')
>>> expr = d > '2012-01-01T12:30:00'
>>> isinstance(expr.rhs, datetime)
True
```

We make a cute function to turn strings into scalar expressions. Note, as written this uses `eval`. I do absolutely *no* sanitation yet. This issue should block this PR until its resolved.

```Python
>>> dtypes = {'x': 'int', 'y': 'real'}
>>> exprify('x + y', dtypes)
x + y
>>> isinstance(_, Expr)
True
```

Using these we extend the server to leverage the expr/compute layer rather than just the data later.

Example query:

```python
{'selection': 'amount >= 200',
'columns': 'name'}
```

CC @quasiben

This is on top of my `imports` branch. For a clean diff see https://github.com/mrocklin/blaze/compare/mrocklin:imports...mrocklin:scalar-coercion?expand=1