arrow icon indicating copy to clipboard operation
arrow copied to clipboard

GH-41364: [GLib][Ruby] Allow passing thread pool to ExecutePlan

Open stenlarsson opened this issue 2 weeks ago • 1 comments

Rationale for this change

Aggregators like first and last are unusable in Ruby because they don't work when the execution plan is executed using multiple threads.

What changes are included in this PR?

This adds the ThreadPool class to be able create a thread pool with a single thread. This can then be passed when creating an ExecuteContext, which in turn can be passed when creating an ExecutePlan.

Are these changes tested?

A Ruby test that shows that the first aggregator works.

Are there any user-facing changes?

A new GArrowThreadPool class, and changed signatures of the functions garrow_execute_context_new and garrow_execute_plan_new. However since the new arguments are nullable, it is backwards compatible for the Ruby API.

This PR includes breaking changes to public APIs.

  • GitHub Issue: #41364

stenlarsson avatar Dec 11 '25 11:12 stenlarsson

:warning: GitHub issue #41364 has been automatically assigned in GitHub to PR creator.

github-actions[bot] avatar Dec 11 '25 11:12 github-actions[bot]

Thanks for the review @kou! I have applied you suggestions and it looks much better now.

stenlarsson avatar Dec 16 '25 09:12 stenlarsson

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

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them.