From a044fc649c159e213d24fb13514339c08a99e6ab Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Wed, 27 Oct 2021 11:38:47 +0200 Subject: [PATCH] ARROW-8285: [Python][Dataset] Test that ScalarExpression accepts numpy scalars Add numpy scalar input to `test_expression_serialization()` in `test_dataset.py`. Closes #11545 from AlenkaF/ARROW-8285 Authored-by: Alenka Frim Signed-off-by: Joris Van den Bossche --- python/pyarrow/tests/test_dataset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/pyarrow/tests/test_dataset.py b/python/pyarrow/tests/test_dataset.py index e5590c4a6bf96..b4959512f1146 100644 --- a/python/pyarrow/tests/test_dataset.py +++ b/python/pyarrow/tests/test_dataset.py @@ -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,