pitrou commented on code in PR #44701:
URL: https://github.com/apache/arrow/pull/44701#discussion_r1838427801


##########
python/pyarrow/tests/test_array.py:
##########
@@ -651,6 +651,31 @@ def test_string_binary_from_buffers():
     assert copied.null_count == 0
 
 
+def test_string_view_from_buffers():
+    array = pa.array(
+        [
+            "String longer than 12 characters",
+            None,
+            "short",
+            "Length is 12"
+        ], type=pa.string_view())
+
+    buffers = array.buffers()
+    copied = pa.StringViewArray.from_buffers(
+        pa.string_view(), len(array), buffers)

Review Comment:
   Let's make sure the result is valid?
   ```suggestion
           pa.string_view(), len(array), buffers)
       copied.validate(full=True)
   ```



-- 
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]

Reply via email to