Skip to content

GH-47172: [Python] Add a utility function to create Arrow table instead of pandas df - #47199

Merged
rok merged 4 commits into
apache:mainfrom
egolearner:py_test_table
Aug 4, 2025
Merged

rok merged 4 commits into
apache:mainfrom
egolearner:py_test_table

Conversation

@egolearner

@egolearner egolearner commented Jul 26, 2025 •

Copy link
Copy Markdown
Contributor

Rationale for this change

resolve #47172

What changes are included in this PR?

Add a utility function to create Arrow table instead of pandas df

Are these changes tested?

yes

Are there any user-facing changes?

no

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@egolearner egolearner changed the title [Python][Test]Add function to create Arrow table instead of pandas df GH-47172: [Python][Test]Add function to create Arrow table instead of pandas df Jul 26, 2025
@kou kou changed the title GH-47172: [Python][Test]Add function to create Arrow table instead of pandas df GH-47172: [Python][Test] Add function to create Arrow table instead of pandas df Jul 26, 2025
Comment thread python/pyarrow/tests/parquet/common.py Resolved
@rok

rok commented Aug 1, 2025

Copy link
Copy Markdown
Member

This looks pretty good @egolearner. I'll start some more Python tests and merge if they pass.

@rok

rok commented Aug 1, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit wheel-windows-*

@github-actions

github-actions Bot commented Aug 1, 2025

Copy link
Copy Markdown

Revision: f0e1edf

Submitted crossbow builds: ursacomputing/crossbow @ actions-9e7c764ef8

Task Status
wheel-windows-cp310-cp310-amd64 GitHub Actions
wheel-windows-cp311-cp311-amd64 GitHub Actions
wheel-windows-cp312-cp312-amd64 GitHub Actions
wheel-windows-cp313-cp313-amd64 GitHub Actions
wheel-windows-cp313-cp313t-amd64 GitHub Actions
wheel-windows-cp39-cp39-amd64 GitHub Actions

@egolearner

Copy link
Copy Markdown
Contributor Author

It seems wheel-windows-cp313-cp313t-amd64 failing is unrelated to this PR.

RuntimeError: CFFI does not support the free-threaded build of CPython 3.13. Upgrade to free-threaded 3.14 or newer to use CFFI with the free-threaded build.

@rok rok changed the title GH-47172: [Python][Test] Add function to create Arrow table instead of pandas df GH-47172: [Python][Test] Add a utility function to create Arrow table instead of pandas df Aug 4, 2025
@rok rok changed the title GH-47172: [Python][Test] Add a utility function to create Arrow table instead of pandas df GH-47172: [Python] Add a utility function to create Arrow table instead of pandas df Aug 4, 2025
@rok
rok merged commit 2cbf122 into apache:main Aug 4, 2025
@rok

rok commented Aug 4, 2025

Copy link
Copy Markdown
Member

Thank you for working this @egolearner! It's a nice improvement and should improve test coverage.

@egolearner

Copy link
Copy Markdown
Contributor Author

Thanks again for your review @rok

@egolearner
egolearner deleted the py_test_table branch August 4, 2025 09:54

@raulcd raulcd 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.

Thanks for the PR! I would have loved to see an utility function that does not require neither pandas nor numpy so we can reuse on our tests without numpy too, basically have a no extra requirements fixture (only python and pyarrow) so we don't require anything else. Maybe we could create a follow up issue?

@rok

rok commented Aug 4, 2025

Copy link
Copy Markdown
Member

Thanks for the PR! I would have loved to see an utility function that does not require neither pandas nor numpy so we can reuse on our tests without numpy too, basically have a no extra requirements fixture (only python and pyarrow) so we don't require anything else. Maybe we could create a follow up issue?

Agreed! The only question in my mind here is do we expose a cpp utility for generating random array data or use Python stdlib. I think for small data sizes Python stdlib would be quite sufficient.

@rok

rok commented Aug 4, 2025

Copy link
Copy Markdown
Member

Although if we have a dependency free test data generator we would probably want to use it everywhere. And in that case we probably want to spend the time to connect to the cpp generator we already have in place for cpp testing for Python testing.

@rok

rok commented Aug 4, 2025

Copy link
Copy Markdown
Member

Opened #47255

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 2cbf122.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

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 utility function to create Arrow table instead of pandas df

3 participants