wjones127 commented on code in PR #3276:
URL: https://github.com/apache/arrow-rs/pull/3276#discussion_r1039999411


##########
arrow-pyarrow-integration-testing/tests/test_sql.py:
##########
@@ -193,6 +200,34 @@ def test_time32_python():
     del b
     del expected
 
+
+def test_empty_array_python():
+    """
+    Python -> Rust -> Python
+    """
+    a = pa.array([], pa.int32())
+    b = rust.round_trip_array(a)
+    b.validate(full=True)
+    assert a.to_pylist() == b.to_pylist()
+    assert a.type == b.type
+    del a
+    del b
+
+
+def test_empty_array_rust():
+    """
+    Python -> Rust -> Python
+    """
+    data = []
+    a = pa.array(data, type=pa.int32())

Review Comment:
   I looked around, and I couldn't find an easy way to create an empty array 
for an arbitrary datatype. @alamb do you have an ideas for that?



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