llama90 commented on code in PR #41413:
URL: https://github.com/apache/arrow/pull/41413#discussion_r1589927807
##########
python/pyarrow/tests/test_extension_type.py:
##########
@@ -267,6 +267,32 @@ def test_ext_type__storage_type():
assert ty.__class__ is ParamExtType
+def test_ext_type_byte_width():
+ # Test for fixed-size binary types
+ ty = UuidType()
+ assert ty.storage_type.byte_width == 16
+ ty = ParamExtType(5)
+ assert ty.storage_type.byte_width == 5
+
+ # Test for non fixed-size binary types
+ ty = LabelType()
+ with pytest.raises(ValueError, match="Non-fixed width type"):
Review Comment:
@jorisvandenbossche
Hello! I've added the `LabelType` as a non-fixed width type in tests.
Is this aligned with the intended behavior for handling these types? Thanks!
--
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]