Skip to content

Commit 9492e6b

Browse files
authored
GH-48406: [Python] Negative test for struct_field no-argument (ARROW-14853) (#48407)
### Rationale for this change Seems like it is decided to make the error message better explicitly in ARROW-14853 and #11961 Therefore, this test can be converted to the negative test. https://github.com/apache/arrow/blob/2a3c5db7900028fbdf54a4162ce6c5b3f6e9f8e4/python/pyarrow/tests/test_compute.py#L3423 ### What changes are included in this PR? This PR proposes to add a negative test. ### Are these changes tested? Yes, via `python -m pytest pyarrow/tests/test_compute.py::test_struct_fields_options -v` ### Are there any user-facing changes? No, test-only. * GitHub Issue: #48406 Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: AlenkaF <[email protected]>
1 parent 933851b commit 9492e6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyarrow/tests/test_compute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3419,8 +3419,8 @@ def test_struct_fields_options():
34193419
with pytest.raises(pa.ArrowInvalid, match="No match for FieldRef"):
34203420
pc.struct_field(arr, '.a.foo')
34213421

3422-
# TODO: https://issues.apache.org/jira/browse/ARROW-14853
3423-
# assert pc.struct_field(arr) == arr
3422+
with pytest.raises(pa.ArrowInvalid, match="cannot be called without options"):
3423+
pc.struct_field(arr)
34243424

34253425

34263426
def test_case_when():

0 commit comments

Comments
 (0)