Skip to content

Commit

Permalink
ARROW-8285: [Python][Dataset] Test that ScalarExpression accepts nump…
Browse files Browse the repository at this point in the history
…y scalars

Add numpy scalar input to `test_expression_serialization()` in `test_dataset.py`.

Closes #11545 from AlenkaF/ARROW-8285

Authored-by: Alenka Frim <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
  • Loading branch information
AlenkaF authored and jorisvandenbossche committed Oct 27, 2021
1 parent 1779e94 commit a044fc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/pyarrow/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,9 @@ def test_expression_serialization():
e = ds.scalar(None)
f = ds.scalar({'a': 1})
g = ds.scalar(pa.scalar(1))
h = ds.scalar(np.int64(2))

all_exprs = [a, b, c, d, e, f, g, a == b, a > b, a & b, a | b, ~c,
all_exprs = [a, b, c, d, e, f, g, h, a == b, a > b, a & b, a | b, ~c,
d.is_valid(), a.cast(pa.int32(), safe=False),
a.cast(pa.int32(), safe=False), a.isin([1, 2, 3]),
ds.field('i64') > 5, ds.field('i64') == 5,
Expand Down

0 comments on commit a044fc6

Please sign in to comment.