GH-47576: [C++][Acero] Fix C++23 build - #50975
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts function definition ordering in Acero’s AsofJoinNode implementation to satisfy stricter C++23 type-completeness requirements when constructing backpressure control (resolving a C++23 build failure referenced by GH-47207).
Changes:
- Moves
InputState::Makefrom an in-class definition to an out-of-line definition placed afterAsofJoinNodeis fully defined. - Preserves existing backpressure controller/handler setup logic while enabling C++23 to perform the
AsofJoinNode*→ExecNode*conversion duringBackpressureControllerconstruction.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
2 similar comments
|
|
|
|
|
The build error seems unrelated, with lots of HTTP errors. And the pre-commit one I don't understand it, also seems unrelated and I'm not changing any python code. |
Rationale for this change
Related to #47576.
In
C++23,Clangdiagnoses the conversion fromAsofJoinNode*toExecNode*while instantiating
std::make_unique<BackpressureController>. At the currentdefinition site,
AsofJoinNodeis still incomplete, causing theAcerobuild tofail.
What changes are included in this PR?
Declare
InputState::MakeinInputStateand define it afterAsofJoinNodeiscomplete. This makes the derived-to-base conversion valid without changing runtime
behavior.
AI assistance: Codex drafted and evaluated this source-ordering change. The
automated checks below were run before opening the PR.
Are these changes tested?
cmake --build cpp/build-clang22-cxx23-release --target arrow_acero_static --parallel 2(
Clang 22.1.8,Release,C++23)ctest -j 16 --output-on-failureincpp/build-clang22-cxx23-release-tests/src/arrow/acero: 14/14 tests passedclang-format --dry-run --Werror cpp/src/arrow/acero/asof_join_node.ccgit diff --checkOriginal `Clang 22` `C++23` diagnostic
Are there any user-facing changes?
No public API changes. This restores the ability to compile the
Acerocomponentwith the affected
Clang 22/C++23configuration.