dbms: Server: fixes [#METR-19266]

This commit is contained in:
Alexey Arno 2016-10-19 21:18:02 +03:00
parent 924402f33e
commit 6c40d9b51e
2 changed files with 3 additions and 5 deletions

View File

@ -352,8 +352,6 @@ void IFunction::postProcessResult(Strategy strategy, Block & block, const Block
throw Exception{"IFunction: internal error", ErrorCodes::LOGICAL_ERROR};
}
/// Return a copy of a given block in which the specified columns are replaced by
/// their respective nested columns if they are nullable.
Block IFunction::createBlockWithNestedColumns(const Block & block, ColumnNumbers args)
{
std::sort(args.begin(), args.end());
@ -373,10 +371,10 @@ Block IFunction::createBlockWithNestedColumns(const Block & block, ColumnNumbers
if (col.column->isNullable())
{
auto nullable_col = static_cast<const ColumnNullable *>(col.column.get());
ColumnPtr nested_col = nullable_col->getNestedColumn();
const ColumnPtr & nested_col = nullable_col->getNestedColumn();
auto nullable_type = static_cast<const DataTypeNullable *>(col.type.get());
DataTypePtr nested_type = nullable_type->getNestedType();
const DataTypePtr & nested_type = nullable_type->getNestedType();
res.insert(i, {nested_col, nested_type, col.name});

View File

@ -863,7 +863,7 @@ MergeTreeData::AlterDataPartTransactionPtr MergeTreeData::alterDataPart(
if (it.second == "")
new_checksums.files.erase(it.first);
else
new_checksums.files[it.second] = add_checksums.files.at(it.first);
new_checksums.files[it.second] = add_checksums.files[it.first];
}
if (new_primary_key_file_size)