raulcd commented on code in PR #46922: URL: https://github.com/apache/arrow/pull/46922#discussion_r2179337488
########## cpp/src/arrow/acero/CMakeLists.txt: ########## @@ -188,68 +192,62 @@ add_arrow_acero_test(hash_aggregate_test SOURCES hash_aggregate_test.cc) add_arrow_acero_test(test_util_internal_test SOURCES test_util_internal_test.cc) -if(ARROW_BUILD_BENCHMARKS) - function(add_arrow_acero_benchmark REL_BENCHMARK_NAME) - set(options) - set(one_value_args PREFIX) - set(multi_value_args LABELS) - cmake_parse_arguments(ARG - "${options}" - "${one_value_args}" - "${multi_value_args}" - ${ARGN}) +function(add_arrow_acero_benchmark REL_BENCHMARK_NAME) + set(options) + set(one_value_args PREFIX) + set(multi_value_args LABELS EXTRA_LINK_LIBS) + cmake_parse_arguments(ARG + "${options}" + "${one_value_args}" + "${multi_value_args}" + ${ARGN}) - if(ARG_PREFIX) - set(PREFIX ${ARG_PREFIX}) - else() - set(PREFIX "arrow-acero") - endif() + if(ARG_PREFIX) + set(PREFIX ${ARG_PREFIX}) + else() + set(PREFIX "arrow-acero") + endif() - if(ARG_LABELS) - set(LABELS ${ARG_LABELS}) - else() - set(LABELS "arrow_acero") - endif() + if(ARG_LABELS) + set(LABELS ${ARG_LABELS}) + else() + set(LABELS "arrow_acero") + endif() - add_arrow_benchmark(${REL_BENCHMARK_NAME} - EXTRA_LINK_LIBS - ${ARROW_ACERO_TEST_LINK_LIBS} - PREFIX - ${PREFIX} - LABELS - ${LABELS} - ${ARG_UNPARSED_ARGUMENTS}) - endfunction() + if(ARROW_BUILD_STATIC) + set(EXTRA_LINK_LIBS arrow_acero_static ${ARROW_ACERO_BENCHMARKS_TEST_LINK_LIBS}) + else() + set(EXTRA_LINK_LIBS arrow_acero_shared ${ARROW_ACERO_BENCHMARKS_TEST_LINK_LIBS}) + endif() + if(ARG_EXTRA_LINK_LIBS) + list(APPEND EXTRA_LINK_LIBS ${ARG_EXTRA_LINK_LIBS}) + endif() - add_arrow_acero_benchmark(expression_benchmark SOURCES expression_benchmark.cc) + add_arrow_compute_benchmark(${REL_BENCHMARK_NAME} + EXTRA_LINK_LIBS + ${EXTRA_LINK_LIBS} + PREFIX + ${PREFIX} + LABELS + ${LABELS} + ${ARG_UNPARSED_ARGUMENTS}) +endfunction() - add_arrow_acero_benchmark(filter_benchmark SOURCES benchmark_util.cc - filter_benchmark.cc) +add_arrow_acero_benchmark(expression_benchmark) - add_arrow_acero_benchmark(project_benchmark SOURCES benchmark_util.cc - project_benchmark.cc) +add_arrow_acero_benchmark(filter_benchmark SOURCES benchmark_util.cc filter_benchmark.cc) - add_arrow_acero_benchmark(asof_join_benchmark SOURCES asof_join_benchmark.cc) +add_arrow_acero_benchmark(project_benchmark SOURCES benchmark_util.cc + project_benchmark.cc) - add_arrow_acero_benchmark(tpch_benchmark SOURCES tpch_benchmark.cc) +add_arrow_acero_benchmark(asof_join_benchmark) - add_arrow_acero_benchmark(aggregate_benchmark SOURCES aggregate_benchmark.cc) +add_arrow_acero_benchmark(tpch_benchmark) - add_arrow_acero_benchmark(hash_join_benchmark SOURCES hash_join_benchmark.cc) +add_arrow_compute_benchmark(aggregate_benchmark Review Comment: Sorry, I was still testing the fix, and push the wrong commit. The issue had to do with linking acero and was found on that test. I've reverted the commit. I've realized we were double linking arrow_acero (we were already doing that in the past for some tests) but the old linking order was masking the real issue. I have pushed the new fix, I am validating benchmarks and CI at the moment. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org