rok commented on code in PR #13454:
URL: https://github.com/apache/arrow/pull/13454#discussion_r914041992
##########
python/pyarrow/tests/test_extension_type.py:
##########
@@ -261,16 +297,19 @@ def test_ext_scalar_from_array():
assert s.type == ty1
if val is not None:
assert s.value == pa.scalar(val, storage.type)
+ assert s.as_py() == UUID(bytes=val)
else:
assert s.value is None
- assert s.as_py() == val
scalars_b = list(b)
assert len(scalars_b) == 4
for sa, sb in zip(scalars_a, scalars_b):
assert sa.is_valid == sb.is_valid
- assert sa.as_py() == sb.as_py()
+ if sa.as_py() is None:
+ assert sa.as_py() == sb.as_py()
+ else:
+ assert sa.as_py().bytes == sb.as_py()
assert sa != sb
Review Comment:
Added one back and introduced `UuidType2()` without `scalar_as_py`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]