Fix column size for const LowCardinality arguments.

This commit is contained in:
Nikolai Kochetov 2019-02-12 19:04:05 +03:00
parent bb686b3154
commit 31397f7156

View File

@ -332,9 +332,9 @@ static const ColumnLowCardinality * findLowCardinalityArgument(const Block & blo
}
static ColumnPtr replaceLowCardinalityColumnsByNestedAndGetDictionaryIndexes(
Block & block, const ColumnNumbers & args, bool can_be_executed_on_default_arguments)
Block & block, const ColumnNumbers & args, bool can_be_executed_on_default_arguments, size_t input_rows_count)
{
size_t num_rows = 0;
size_t num_rows = input_rows_count;
ColumnPtr indexes;
for (auto arg : args)
@ -426,7 +426,7 @@ void PreparedFunctionImpl::execute(Block & block, const ColumnNumbers & args, si
block_without_low_cardinality.safeGetByPosition(result).type = res_low_cardinality_type->getDictionaryType();
ColumnPtr indexes = replaceLowCardinalityColumnsByNestedAndGetDictionaryIndexes(
block_without_low_cardinality, args, can_be_executed_on_default_arguments);
block_without_low_cardinality, args, can_be_executed_on_default_arguments, input_rows_count);
executeWithoutLowCardinalityColumns(block_without_low_cardinality, args, result, block_without_low_cardinality.rows(), dry_run);