~pythonxy/pythonxy-upstream/blaze-into

Viewing all changes in revision 520.

  • Committer: Joe Jevnik
  • Author(s): Eddie Hebert
  • Date: 2017-10-18 19:36:31 UTC
  • Revision ID: git-v1:e8ee3770d4446997b8c7652b8612f408cc53cae8
BUG: Fix reflection Postgres double precision columns.

A double precision column in a Postrges table, whose dshape specified a dtype of
`float64` for that column, would return a decimal dtype.

Fix by defining a group of types which are 'precision' types, and check for
membership in that before attempting to lookup the typeengine typ in
`blaze.backends.sql.revtypes`

Without the fix applied the newly added test fails with the following assertion
error, when comparing the `discover` of the `bind` with the expected values:
```
    @assert_dshape_equal.register(object, object)
    def _base_case(a, b, path=None, **kwargs):
>       assert a == b, '%s != %s\n%s' % (a, b, _fmt_path(path))
E       AssertionError: decimal[precision=53, scale=None] != float64
E       path: _.measure['a']
```

Also, added `sa.Float` as a precision type, which fixes
`sa.Float(precision=24)`; this allows removal of the `xfail` marking in
`odo/backends/test/test_sql::test_types`.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: