fix build

This commit is contained in:
Nikolai Kochetov 2018-03-19 19:53:23 +03:00
parent 5bd9294847
commit 9d92484970
3 changed files with 5 additions and 5 deletions

View File

@ -31,8 +31,8 @@ namespace ErrorCodes
}
ColumnArray::ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column)
: data(std::move(nested_column)), offsets(std::move(offsets_column))
ColumnArray::ColumnArray(MutableColumnPtr && nested_column, const ColumnPtr & offsets_column)
: data(std::move(nested_column)), offsets(offsets_column)
{
if (!typeid_cast<const ColumnOffsets *>(offsets_column.get()))
throw Exception("offsets_column must be a ColumnUInt64", ErrorCodes::ILLEGAL_COLUMN);

View File

@ -24,7 +24,7 @@ private:
friend class COWPtrHelper<IColumn, ColumnArray>;
/** Create an array column with specified values and offsets. */
ColumnArray(MutableColumnPtr && nested_column, MutableColumnPtr && offsets_column);
ColumnArray(MutableColumnPtr && nested_column, const ColumnPtr & offsets_column);
/** Create an empty column of arrays with the type of values as in the column `nested_column` */
ColumnArray(MutableColumnPtr && nested_column);

View File

@ -52,8 +52,8 @@ void AddingDefaultBlockOutputStream::write(const Block & block)
DataTypePtr nested_type = typeid_cast<const DataTypeArray &>(*column_to_add.type).getNestedType();
UInt64 nested_rows = rows ? get<UInt64>((*offsets_column)[rows - 1]) : 0;
ColumnPtr nested_column = nested_type->createColumnConstWithDefaultValue(nested_rows)->convertToFullColumnIfConst();
column_to_add.column = ColumnArray::create(nested_column, offsets_column);
MutableColumnPtr nested_column = nested_type->createColumnConstWithDefaultValue(nested_rows)->convertToFullColumnIfConst();
column_to_add.column = ColumnArray::create(std::move(nested_column), offsets_column);
}
else
{