westonpace commented on code in PR #13940:
URL: https://github.com/apache/arrow/pull/13940#discussion_r961845352
##########
cpp/src/arrow/compute/exec/key_hash_test.cc:
##########
@@ -219,12 +231,20 @@ TEST(VectorHash, Basic) {
for (bool use_32bit_hash : {true, false}) {
for (bool use_varlen_input : {false, true}) {
for (int itest = 0; itest < numtest; ++itest) {
- TestVectorHash::RunSingle(&gen, use_32bit_hash, use_varlen_input,
min_length,
- max_length);
+ TestVectorHash::RunSingle<Type>(&gen, use_32bit_hash, use_varlen_input,
+ min_length, max_length);
}
}
}
}
+TEST(VectorHash, BasicBinary) { TestVectorHash<BinaryType>(); }
+
+TEST(VectorHash, BasicLargeBinary) { TestVectorHash<LargeBinaryType>(); }
+
+TEST(VectorHash, BasicString) { TestVectorHash<StringType>(); }
+
+TEST(VectorHash, BasicLargeString) { TestVectorHash<LargeStringType>(); }
+
Review Comment:
```suggestion
TEST(VectorHash, BasicBinary) { RunTestVectorHash<BinaryType>(); }
TEST(VectorHash, BasicLargeBinary) { RunTestVectorHash<LargeBinaryType>(); }
TEST(VectorHash, BasicString) { RunTestVectorHash<StringType>(); }
TEST(VectorHash, BasicLargeString) { RunTestVectorHash<LargeStringType>(); }
```
##########
cpp/src/arrow/compute/exec/key_hash_test.cc:
##########
@@ -208,7 +219,8 @@ class TestVectorHash {
}
};
-TEST(VectorHash, Basic) {
+template <typename Type>
+void TestVectorHash() {
Review Comment:
Hmm, AppVeyor (Windows) is failing here:
```
C:/projects/arrow/cpp/src/arrow/compute/exec/key_hash_test.cc(239): error
C2904: 'TestVectorHash': name already used for a template in the current scope
C:/projects/arrow/cpp/src/arrow/compute/exec/key_hash_test.cc(36): note: see
declaration of 'arrow::compute::TestVectorHash'
[145/356] Building CXX object
src\arrow\compute\kernels\CMakeFiles\arrow-compute-aggregate-test.dir\Unity\unity_0_cxx.cxx.obj
```
Maybe it doesn't like having both a method and a class named
`TestVectorHash`?
```suggestion
void RunTestVectorHash() {
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]