Skip to content

Commit

Permalink
Merge pull request blaze#1478 from kwmsmith/test-join-schema-option-s…
Browse files Browse the repository at this point in the history
…trings

Add test for join dshape with string option types.
  • Loading branch information
kwmsmith committed Apr 12, 2016
2 parents cbdd24a + 02d0fc2 commit 73f5fa6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions blaze/expr/tests/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,30 @@ def test_join_option_types():
assert join(b, a, 'x').dshape == dshape('var * {x: int}')


@pytest.mark.xfail
def test_join_option_types_outer():
a = symbol('a', 'var * {x: ?int}')
b = symbol('b', 'var * {x: int}')

assert (join(a, b, 'x', how='outer').dshape ==
join(b, a, 'x', how='outer').dshape ==
dshape('var * {x: ?int}'))


def test_join_option_string_types():
a = symbol('a', 'var * {x: ?string}')
b = symbol('b', 'var * {x: string}')
c = symbol('c', 'var * {x: ?string}')

assert (join(a, b, 'x').dshape ==
join(b, a, 'x').dshape ==
dshape('var * {x: string}'))

assert (join(a, c, 'x').dshape ==
join(c, a, 'x').dshape ==
dshape('var * {x: ?string}'))


def test_join_exceptions():
"""
exception raised for mismatched schema;
Expand Down

0 comments on commit 73f5fa6

Please sign in to comment.