You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/13 14:13:06 UTC

[GitHub] [arrow] rok commented on a diff in pull request #13594: ARROW-17065: [Python] Allow using subclassed ExtensionScalar in ExtensionType

rok commented on code in PR #13594:
URL: https://github.com/apache/arrow/pull/13594#discussion_r920130884


##########
python/pyarrow/tests/test_extension_type.py:
##########
@@ -229,7 +238,7 @@ def test_ext_array_to_pylist():
     storage = pa.array([b"foo", b"bar", None], type=pa.binary(3))
     arr = pa.ExtensionArray.from_storage(ty, storage)
 
-    assert arr.to_pylist() == [b"foo", b"bar", None]
+    assert [x.as_py() if x else None for x in arr.to_pylist()] == [b"foo", b"bar", None]

Review Comment:
   Yeah. It seems that if `__arrow_ext_scalar_class__` is not defined on the ExtensionType we `.as_py()` is not available.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org