Updated test

This commit is contained in:
Maksim Kita 2021-04-14 16:49:38 +03:00
parent da3d3e906a
commit 2c3abcaad1
3 changed files with 14 additions and 3 deletions

View File

@ -51,6 +51,14 @@ Columns DirectDictionary<dictionary_key_type>::getColumns(
key_to_fetched_index.reserve(requested_keys.size());
auto fetched_columns_from_storage = request.makeAttributesResultColumns();
for (size_t attribute_index = 0; attribute_index < request.attributesSize(); ++attribute_index)
{
if (!request.shouldFillResultColumnWithIndex(attribute_index))
continue;
auto & fetched_column_from_storage = fetched_columns_from_storage[attribute_index];
fetched_column_from_storage->reserve(requested_keys.size());
}
size_t fetched_key_index = 0;

View File

@ -53,7 +53,8 @@
</substitutions>
<query>
SELECT dictGet('default.simple_key_flat_dictionary', {column_name}, rand64() % toUInt64({elements_count}))
WITH rand64() % toUInt64({elements_count}) as key
SELECT dictGet('default.simple_key_flat_dictionary', {column_name}, key)
FROM system.numbers
LIMIT {elements_count}
FORMAT Null;
@ -65,7 +66,8 @@
</query>
<query>
SELECT dictHas('default.simple_key_flat_dictionary', rand64() % toUInt64(75000000))
WITH rand64() % toUInt64(75000000) as key
SELECT dictHas('default.simple_key_flat_dictionary', key)
FROM system.numbers
LIMIT 75000000
FORMAT Null;

View File

@ -95,7 +95,8 @@
FORMAT Null;
</query>
<query>
SELECT * FROM default.simple_key_hashed_dictionary;
SELECT * FROM default.simple_key_hashed_dictionary
FORMAT Null;
</query>
<query>
WITH rand64() % toUInt64({elements_count}) as key