Describe the bug, including details regarding any error messages, version, and platform.
#39067 was merged, which conflicted with #40325 producing build failures on main.
https://github.com/apache/arrow/actions/runs/8285793239/job/22674307202?pr=40559#step:6:1750
Component(s)
C++