fix and performance test template

This commit is contained in:
Andrei Nekrashevich 2020-05-10 22:07:02 +03:00
parent d459f07eee
commit c3873495c9
2 changed files with 14 additions and 2 deletions

View File

@ -73,9 +73,9 @@ public:
data_to.resize(next_offset);
offsets_to[row_num] = next_offset;
auto * data_to_ptr = data_to.data(); // avoid assert on array indexing after end
auto data_to_ptr = reinterpret_cast<UInt64 *>(data_to.data()); // avoid assert on array indexing after end
for (size_t pos = offset, end = offset + length; pos < end;
pos += 8) // We have padding in column buffers that we can overwrite.
pos += sizeof(UInt64)) // We have padding in column buffers that we can overwrite.
{
UInt64 rand = thread_local_rng();
data_to_ptr[pos] = rand;

View File

@ -0,0 +1,12 @@
<test>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(10))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(100))</query>
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(randomString(1000))</query>
<query>SELECT count() FROM zeros(10000) WHERE NOT ignore(randomString(10000))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(rand() % 10))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(randomString(rand() % 100))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(randomString(rand() % 1000))</query>
</test>