lidavidm commented on code in PR #14181:
URL: https://github.com/apache/arrow/pull/14181#discussion_r976406545
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -1731,6 +1731,22 @@ def test_cast():
assert pc.cast(arr, expected.type) == expected
+def test_fsl_to_fsl_cast():
+ for value_type in (pa.bool_(), pa.float32(), pa.int64()):
+ # Valid case
+ # Different field name and different type.
+ cast_type = pa.list_(pa.field("element", value_type), 2)
+ fsl = pa.FixedSizeListArray.from_arrays(
+ pa.array([1, 2, 3, 4, 5, 6]), 2)
Review Comment:
It would be good to test with nulls as well, both at the list level and the
child array level
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -1731,6 +1731,22 @@ def test_cast():
assert pc.cast(arr, expected.type) == expected
+def test_fsl_to_fsl_cast():
+ for value_type in (pa.bool_(), pa.float32(), pa.int64()):
+ # Valid case
+ # Different field name and different type.
+ cast_type = pa.list_(pa.field("element", value_type), 2)
+ fsl = pa.FixedSizeListArray.from_arrays(
+ pa.array([1, 2, 3, 4, 5, 6]), 2)
Review Comment:
specify the type of the source array explicitly here?
--
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]