Skip to content

Commit

Permalink
Fix build for devtoolset-9 on CentOS 7 (#8214)
Browse files Browse the repository at this point in the history
Summary:
devtoolset-9 has some issue on choosing the right template when building unit tests

```
/root/velox/velox/exec/tests/AggregateFunctionRegistryTest.cpp: In member function 'virtual void facebook::velox::exec::test::FunctionRegistryTest_multipleNames_Test::TestBody()':
/root/velox/velox/exec/tests/AggregateFunctionRegistryTest.cpp:273:26: error: call of overloaded 'registerAggregateFunction(<brace-enclosed initializer list>, std::vector<std::shared_ptr<facebook::velox::exec::AggregateFunctionSignature> >&, facebook::velox::exec::test::FunctionRegistryTest_multipleNames_Test::TestBody()::<lambda(facebook::velox::core::AggregationNode::Step, const std::vector<std::shared_ptr<const facebook::velox::Type> >&, const TypePtr&, const facebook::velox::core::QueryConfig&)>&, bool, bool)' is ambiguous
  273 |       /*overwrite*/ false);
      |                          ^
In file included from /root/velox/velox/exec/tests/AggregateFunctionRegistryTest.cpp:19:
/root/velox/./velox/exec/Aggregate.h:421:29: note: candidate: 'facebook::velox::exec::AggregateRegistrationResult facebook::velox::exec::registerAggregateFunction(const string&, const std::vector<std::shared_ptr<facebook::velox::exec::AggregateFunctionSignature> >&, const AggregateFunctionFactory&, bool, bool)'
  421 | AggregateRegistrationResult registerAggregateFunction(
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/velox/./velox/exec/Aggregate.h:430:42: note: candidate: 'std::vector<facebook::velox::exec::AggregateRegistrationResult> facebook::velox::exec::registerAggregateFunction(const std::vector<std::basic_string<char> >&, const std::vector<std::shared_ptr<facebook::velox::exec::AggregateFunctionSignature> >&, const AggregateFunctionFactory&, bool, bool)'
  430 | std::vector<AggregateRegistrationResult> registerAggregateFunction(
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
````

Pull Request resolved: #8214

Reviewed By: amitkdutta

Differential Revision: D52820297

Pulled By: kgpai

fbshipit-source-id: 21a128d6e0f34606b9ced38ed399ec7874a35e32
  • Loading branch information
zhouyuan authored and facebook-github-bot committed Jan 17, 2024
1 parent 1d778ef commit 99c2f84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/exec/tests/AggregateFunctionRegistryTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ TEST_F(FunctionRegistryTest, multipleNames) {
"aggregate_func2", {BIGINT(), DOUBLE()}, BIGINT(), ARRAY(BIGINT()));

auto registrationResults = registerAggregateFunction(
{std::string("aggregate_func2"), std::string("aggregate_func3")},
std::vector<std::string>{"aggregate_func2", "aggregate_func3"},
signatures,
factory,
/*registerCompanionFunctions*/ true,
Expand Down

0 comments on commit 99c2f84

Please sign in to comment.