Better semantic of sharing columns: development [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-12-16 09:02:54 +03:00
parent 278f8b9fcb
commit 7d69e041f5
4 changed files with 8 additions and 8 deletions

View File

@ -1290,7 +1290,7 @@ private:
const auto mask = createConstMask<T>(block, arguments, is_const);
const auto & val = value_col->getData();
const auto out_col = ColumnVector<UInt8>::create(size);
auto out_col = ColumnVector<UInt8>::create(size);
auto & out = out_col->getData();
if (is_const)
@ -1323,7 +1323,7 @@ private:
else
{
const auto mask = createMask<T>(size, block, arguments);
const auto out_col = ColumnVector<UInt8>::create(size);
auto out_col = ColumnVector<UInt8>::create(size);
auto & out = out_col->getData();

View File

@ -789,7 +789,7 @@ private:
if (!col_nested)
return false;
auto col_res = std::make_shared<ResultColumnType>();
auto col_res = ResultColumnType::create();
/// Null maps of the 1st and second function arguments,
/// if it applies.
@ -837,7 +837,7 @@ private:
if (!col_nested)
return false;
auto col_res = std::make_shared<ResultColumnType>();
auto col_res = ResultColumnType::create();
/// Null maps of the 1st and second function arguments,
/// if it applies.

View File

@ -39,8 +39,8 @@ std::unique_ptr<IArraySink> createArraySink(ColumnArray & col, size_t column_siz
using Creator = ApplyTypeListForClass<ArraySinkCreator, TypeListNumbers>::Type;
if (auto column_nullable = typeid_cast<ColumnNullable *>(&col.getData()))
{
ColumnArray column(column_nullable->getNestedColumnPtr(), col.getOffsetsPtr());
return Creator::create(column, &column_nullable->getNullMapColumn(), column_size);
auto column = ColumnArray::create(column_nullable->getNestedColumnPtr(), col.getOffsetsPtr());
return Creator::create(*column, &column_nullable->getNullMapColumn(), column_size);
}
return Creator::create(col, nullptr, column_size);
}

View File

@ -51,8 +51,8 @@ std::unique_ptr<IArraySource> createArraySource(const ColumnArray & col, bool is
using Creator = typename ApplyTypeListForClass<ArraySourceCreator, TypeListNumbers>::Type;
if (auto column_nullable = typeid_cast<const ColumnNullable *>(&col.getData()))
{
ColumnArray column(column_nullable->getNestedColumnPtr(), col.getOffsetsPtr());
return Creator::create(column, &column_nullable->getNullMapColumn(), is_const, total_rows);
auto column = ColumnArray::create(column_nullable->getNestedColumnPtr(), col.getOffsetsPtr());
return Creator::create(*column, &column_nullable->getNullMapColumn(), is_const, total_rows);
}
return Creator::create(col, nullptr, is_const, total_rows);
}