Merge pull request #10104 from ClickHouse/adjust-collisions-weak-hash

Remove unwanted output from unit tests
This commit is contained in:
alexey-milovidov 2020-04-08 04:10:08 +03:00 committed by GitHub
commit bcb2899b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,10 @@
#include <unordered_map>
#include <iostream>
#include <sstream>
#include <Common/hex.h>
using namespace DB;
template <typename T>
@ -69,6 +71,8 @@ void checkColumn(
std::unordered_map<UInt32, T> map;
size_t num_collisions = 0;
std::stringstream collitions_str;
for (size_t i = 0; i < eq_class.size(); ++i)
{
auto & val = eq_class[i];
@ -82,12 +86,16 @@ void checkColumn(
if (num_collisions <= max_collisions_to_print)
{
std::cout << "Collision:\n";
std::cout << print_for_row(it->second) << '\n';
std::cout << print_for_row(i) << std::endl;
collitions_str << "Collision:\n";
collitions_str << print_for_row(it->second) << '\n';
collitions_str << print_for_row(i) << std::endl;
}
else if (num_collisions > allowed_collisions)
if (num_collisions > allowed_collisions)
{
std::cerr << collitions_str.rdbuf();
break;
}
}
}