danepitkin commented on code in PR #39813:
URL: https://github.com/apache/arrow/pull/39813#discussion_r1474834192
##########
python/pyarrow/tests/test_array.py:
##########
@@ -3573,3 +3573,28 @@ def test_run_end_encoded_from_buffers():
with pytest.raises(ValueError):
pa.RunEndEncodedArray.from_buffers(ree_type, length, buffers,
1, offset, children)
+
+
[email protected](('list_array_type'),
+ [pa.ListViewArray, pa.LargeListViewArray])
+def test_list_view_from_arrays(list_array_type):
+ values = [[1, 2], [3, 4, 5], [6, None, 7], [8]]
+ offsets = [0, 0, 1, 2, 3]
+ sizes = [2, 0, 3, 3, 1]
+ array = list_array_type.from_arrays(offsets, sizes, values)
+
+ assert array.values.to_pylist() == values
Review Comment:
Good point, I need to update values to be a flat list, not a nested list, in
order to get the correct value to assert on.
--
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]