uwescience/raco — pull request #217 by 7andrew7 (2014-05-29 23:00:47+00:00)
Title: Fix raco type's system.

Previously, raco.scheme had a type parameter, but this field was inconsistently used and applied. For example, it variously contained values like "INTEGER_TYPE", "int", int, "unknown", None, etc. Moreover, raco did essentially zero type-checking. All type-safety was deferred to the backend database. This resulted in some pretty obtuse error messages.

This PR standardizes the type parameter to refer to well-known type names in raco.types. And, it applies type checking as a side-effect of evaluating the type of an expression. See raco/myrial/type_tests.py for new tests.

Caveats: the type analysis is simplistic: raco understands doubles, longs, strings, and booleans. In particular, there is no difference between int/long and float/double. I didn't want to walk the slippery slope of codifying implicit type conversions. This PR is already pretty complex.

@dhalperi : I haven't tested this against myria-web yet; I can do this if people think the design looks sane.
@bmyerz : unit tests pass, but this might interfere with your stuff in some bad way.

Fixes #213.