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


##########
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:
   Same here. You may want to turn `rust.create_int32_array` into something 
that takes a datatype :-)



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