Skip to content

GH-50398/GH-50829 2/6: Remove pyarrow.benchmark and simplify parse helpers - #51373

Closed
fboudra wants to merge 13 commits into
apache:mainfrom
fboudra:pr-50409-remove-benchmark
Closed

fboudra wants to merge 13 commits into
apache:mainfrom
fboudra:pr-50409-remove-benchmark

Conversation

@fboudra

@fboudra fboudra commented Sep 17, 2026

Copy link
Copy Markdown

Rationale for this change

#50398
#50829

What changes are included in this PR?

Two unrelated small cleanups.

The first part removes the internal benchmark module: pyarrow/benchmark.py, pyarrow/benchmark.pxi, benchmarks/microbenchmarks.py, src/arrow/python/benchmark.{cc,h}, and the CMake registration. Nothing in the tree imports it, and it is not needed for the limited API work, so it goes.

The second part is three simplifications in the parse helpers:

  • helpers.cc gains PyBytes_AsStdStringView so the repeated bytes/UUID-to-string-view code has one place to live (this also addresses review comments on the helpers)
  • ParseBinary uses ARROW_DCHECK(!PyErr_Occurred()) instead of RETURN_IF_PYERROR after the PyBytes/PyByteArray accessors, which cannot fail on an object that already passed the type check
  • ParseUuid drops a redundant RETURN_IF_PYERROR

Deletions and call-site simplifications only. No behavior change; the test suite stays green.

Are these changes tested?

Yes

Are there any user-facing changes?

No

Was AI used for this PR?

PR code and description written by:

  • [x ] Human
  • AI

Reviewed before submission by:

  • [ x] Human
  • AI
  • Not reviewed

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically closed because you currently have 4 open pull requests, which is more than the limit of 3.

Due to the increase in pull requests opened by AI bots, and in order to keep the review queue manageable, Apache Arrow limits contributors without repository access to at most 3 concurrently open pull requests. This helps make sure each pull request gets the attention it needs and that work in progress does not go stale.

Once one of your other open pull requests has been merged or closed, you are welcome to reopen this one.

See also:

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.

2 participants