milesgranger commented on code in PR #14495:
URL: https://github.com/apache/arrow/pull/14495#discussion_r1005205421
##########
python/pyarrow/tests/test_compute.py:
##########
@@ -2691,16 +2691,28 @@ def test_struct_fields_options():
b = pa.array(["bar", None, ""])
c = pa.StructArray.from_arrays([a, b], ["a", "b"])
arr = pa.StructArray.from_arrays([a, c], ["a", "c"])
-
- assert pc.struct_field(arr,
- indices=[1, 1]) == pa.array(["bar", None, ""])
- assert pc.struct_field(arr, [1, 1]) == pa.array(["bar", None, ""])
- assert pc.struct_field(arr, [0]) == pa.array([4, 5, 6], type=pa.int64())
+ assert pc.struct_field(arr, '.c.b', is_dot_path=True) == b
+ assert pc.struct_field(arr, '.a', is_dot_path=True) == a
+ assert pc.struct_field(arr, 'a') == a
+ assert pc.struct_field(arr, indices=[1, 1]) == b
+ assert pc.struct_field(arr, [1, 1]) == b
Review Comment:
Done in
https://github.com/apache/arrow/pull/14495/commits/0ff256726c100e791378534c9a7fdbd8d5c6dc1b
and
https://github.com/apache/arrow/pull/14495/commits/a4b5ce00dae66fe9a329359700d3db767eb31e20
--
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]