mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Correct calculation of avg_value_size_hint #3589
This commit is contained in:
parent
31561ef25a
commit
7e6d9ed82b
@ -260,8 +260,8 @@ void DataTypeArray::deserializeBinaryBulkWithMultipleStreams(
|
||||
throw Exception("Nested column is longer than last offset", ErrorCodes::LOGICAL_ERROR);
|
||||
size_t nested_limit = last_offset - nested_column.size();
|
||||
|
||||
/// We cannot use size hint for arrays to read their elements.
|
||||
settings.avg_value_size_hint = 0;
|
||||
/// Adjust value size hint. Divide it to the average array size.
|
||||
settings.avg_value_size_hint = nested_limit ? settings.avg_value_size_hint / nested_limit * offset_values.size() : 0;
|
||||
|
||||
nested->deserializeBinaryBulkWithMultipleStreams(nested_column, nested_limit, settings, state);
|
||||
settings.path.pop_back();
|
||||
|
Loading…
Reference in New Issue
Block a user