mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix tests.
This commit is contained in:
parent
3a74ec7c0c
commit
df8e030b2d
@ -368,6 +368,18 @@ Block Block::cloneWithColumns(const Columns & columns) const
|
||||
}
|
||||
|
||||
|
||||
Block Block::cloneWithoutColumns() const
|
||||
{
|
||||
Block res;
|
||||
|
||||
size_t num_columns = data.size();
|
||||
for (size_t i = 0; i < num_columns; ++i)
|
||||
res.insert({ nullptr, data[i].type, data[i].name });
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Block Block::sortColumns() const
|
||||
{
|
||||
Block sorted_block;
|
||||
|
@ -109,6 +109,7 @@ public:
|
||||
Columns getColumns() const;
|
||||
void setColumns(const Columns & columns);
|
||||
Block cloneWithColumns(const Columns & columns) const;
|
||||
Block cloneWithoutColumns() const;
|
||||
|
||||
/** Get empty columns with the same types as in block. */
|
||||
MutableColumns cloneEmptyColumns() const;
|
||||
|
@ -308,7 +308,7 @@ void PreparedFunctionImpl::execute(Block & block, const ColumnNumbers & args, si
|
||||
if (useDefaultImplementationForColumnsWithDictionary())
|
||||
{
|
||||
auto & res = block.safeGetByPosition(result);
|
||||
Block block_without_dicts = block.cloneEmpty();
|
||||
Block block_without_dicts = block.cloneWithoutColumns();
|
||||
|
||||
for (auto arg : args)
|
||||
block_without_dicts.safeGetByPosition(arg).column = block.safeGetByPosition(arg).column;
|
||||
@ -334,7 +334,7 @@ void PreparedFunctionImpl::execute(Block & block, const ColumnNumbers & args, si
|
||||
else
|
||||
{
|
||||
convertColumnsWithDictionaryToFull(block_without_dicts, args);
|
||||
executeWithoutColumnsWithDictionary(block_without_dicts, args, result, block_without_dicts.rows());
|
||||
executeWithoutColumnsWithDictionary(block_without_dicts, args, result, input_rows_count);
|
||||
res.column = block_without_dicts.safeGetByPosition(result).column;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user