GH-46178: [R] source_node alignment warning#50120
Conversation
|
@github-actions crossbow submit test-r-linux-sanitizers |
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Arrow R Acero execution plan creation to avoid warnings about unaligned source buffers by configuring plan-wide alignment handling to reallocate unaligned buffers.
Changes:
- Create an
acero::QueryOptionsinstance when building anExecPlanin R. - Set
query_options.unaligned_buffer_handlingtoacero::UnalignedBufferHandling::kReallocate. - Pass the configured
QueryOptionsintoacero::ExecPlan::Make(...).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| acero::QueryOptions query_options; | ||
| query_options.unaligned_buffer_handling = acero::UnalignedBufferHandling::kReallocate; | ||
| auto plan = ValueOrStop(acero::ExecPlan::Make( | ||
| std::move(query_options), use_threads ? &threaded_context : gc_context())); |
There was a problem hiding this comment.
Nope, this is pedantic, most of our users don't engage with this at this level. The real question isn't whether we should document it but whether there'll likely be user impact. Given we don't see these warnings particularly often on our tests, I'm going to assume minimal impact.
|
@github-actions crossbow submit test-r-linux-sanitizers |
|
Revision: bf17c95 Submitted crossbow builds: ursacomputing/crossbow @ actions-cb1dab0945
|
jonkeane
left a comment
There was a problem hiding this comment.
I looked through the asan logs and on main (the latest crossbow run) I see:
2026-06-08T02:07:07.6984909Z /arrow/cpp/src/arrow/acero/source_node.cc:77: An input buffer was poorly aligned. This could lead to crashes or poor performance on some hardware. Please ensure that all Acero sources generate aligned buffers, or change the unaligned buffer handling configuration to silence this warning.
and I don't see that on the run on this PR. I will run this against our CRAN release crossbow job too, and if that passes, we are good to merge.
|
@github-actions crossbow submit test-r-macos-as-cran |
|
Revision: bf17c95 Submitted crossbow builds: ursacomputing/crossbow @ actions-574fe09b49
|
Thanks loads for digging through those logs - I'd meant to do that myself! |
Rationale for this change
There was a warning about unaligned nodes
What changes are included in this PR?
Make them get aligned
Are these changes tested?
Nah, but we should see a lack of warning on CI
Are there any user-facing changes?
Nope