Skip to content

GH-48182: [Python] Add regression test for RecordBatch.from_struct_array with list offsets - #49162

Open
Gnananjali wants to merge 2 commits into
apache:mainfrom
Gnananjali:GH-48182-add-regression-test
Open

Gnananjali wants to merge 2 commits into
apache:mainfrom
Gnananjali:GH-48182-add-regression-test

Conversation

@Gnananjali

@Gnananjali Gnananjali commented Feb 6, 2026 •

Copy link
Copy Markdown

Adds a regression test to ensure RecordBatch.from_struct_array correctly handles sliced StructArray with offsets.

This test verifies that only the sliced rows are included when converting a StructArray to RecordBatch.

This addresses GH-48182.

@AlenkaF AlenkaF left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @Gnananjali and sorry for such a late reply.

Everything looks good. I only have one total nit: can we put the tests together with existing ones on test_recordbatch_from_struct_* which are currently starting on line 884:

def test_recordbatch_from_struct_array_invalid():

@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 19, 2026
@Reranko05

Copy link
Copy Markdown
Collaborator

@Gnananjali Thanks for your contribution! :)
Since this PR has been open for quite some time, I wanted to check whether you're still interested in continuing with it. If so, please address the feedback provided by the maintainer above.

@Gnananjali

Copy link
Copy Markdown
Author

Hi! Thank you for following up, and apologies for the delayed response. I only recently noticed the review notifications.

I'm definitely interested in continuing this contribution. I'll address Alenka's feedback by moving the test alongside the existing test_recordbatch_from_struct_* tests and push an update.

Thank you for your patience!

@Gnananjali

Copy link
Copy Markdown
Author

Thanks for the review! I've moved the test next to the existing test_recordbatch_from_struct_* tests as suggested. The update is pushed to the PR.

@Reranko05
Reranko05 requested a review from AlenkaF October 31, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants