westonpace commented on a change in pull request #11106:
URL: https://github.com/apache/arrow/pull/11106#discussion_r708793994
##########
File path: python/pyarrow/tests/test_array.py
##########
@@ -1951,6 +1952,13 @@ def test_time32_time64_from_integer():
assert result.equals(expected)
+def test_uuid_to_binary():
+ values = [uuid.uuid4() for _ in range(32)]
+ values_bytes = [value.bytes for value in values]
+ arrow_values = pa.array(values)
+ assert arrow_values.to_pylist() == values_bytes
Review comment:
Good catch. It was `binary()`. I updated it to `fixed_size_binary` but
that raises the question of whether or not we want to support converting
heterogeneous arrays of uuid/str/bytes. At the moment it does so (falling back
to `pa.binary`) but only because I don't clear `keep_going` which means it
needs to scan the entire array of UUIDs to ensure there is no str/bytes in
there first. So converting homogeneous arrays of UUID would be slightly faster
if we didn't support heterogeneous arrays.
--
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]