Skip to content

GH-35408: [Python] Add tests for struct-to-struct cast - #55952

Open
Abhigyan1805 wants to merge 1 commit into
apache:mainfrom
Abhigyan1805:fm/arrow-35408
Open

Abhigyan1805 wants to merge 1 commit into
apache:mainfrom
Abhigyan1805:fm/arrow-35408

Conversation

@Abhigyan1805

@Abhigyan1805 Abhigyan1805 commented Dec 3, 2026 •

Copy link
Copy Markdown

Rationale for this change

The C++ struct-to-struct cast (GH-17882) has no Python test, as noted in #35408.

What changes are included in this PR?

Adds test_struct_cast_* tests in python/pyarrow/tests/test_compute.py covering: a null-typed field cast to int64 (the example from the GH-17882 discussion), field type changes, reordering/dropping/adding fields (matched by name), nullability, and nested structs.

Are these changes tested?

These are tests only. I ran them against the released pyarrow 26.0.1 wheel (all 5 pass); I did not build the C++ library locally.

Are there any user-facing changes?

No.

Was AI used for this PR?

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

The tests and this description were generated by an AI agent (Claude Code) working for me. The agent probed the actual cast behaviour with the released wheel and wrote the assertions from that. I reviewed the diff before submission.

Closes #35408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Python] Add a test for struct-to-struct cast

1 participant