dbms: better [#METR-19266]

This commit is contained in:
Alexey Arno 2016-08-11 16:50:47 +03:00
parent 828012c077
commit 180b14eabf
2 changed files with 9 additions and 1 deletions

View File

@ -645,6 +645,9 @@ DEFINE_TYPE_PRODUCT_RULE(Enriched::IntFloat64, Enriched::UInt16, Enriched::IntFl
DEFINE_TYPE_PRODUCT_RULE(Enriched::IntFloat64, Enriched::UInt32, Enriched::IntFloat64);
DEFINE_TYPE_PRODUCT_RULE(Enriched::IntFloat64, Enriched::IntFloat64, Enriched::IntFloat64);
DEFINE_TYPE_PRODUCT_RULE(Enriched::IntFloat32, Enriched::Void, Enriched::IntFloat32);
DEFINE_TYPE_PRODUCT_RULE(Enriched::IntFloat64, Enriched::Void, Enriched::IntFloat64);
#undef DEFINE_TYPE_PRODUCT_RULE
}

View File

@ -100,7 +100,12 @@ ColumnPtr ColumnNullable::cloneResized(size_t size) const
{
ColumnPtr new_col_holder = std::make_shared<ColumnNullable>(nested_column.get()->cloneResized(size));
auto & new_col = static_cast<ColumnNullable &>(*new_col_holder);
new_col.null_map = null_map.get()->cloneResized(size);
/// Create a new null byte map for the cloned column.
/// Resize it if required.
new_col.null_map = null_map.get()->clone();
if (size != this->size())
new_col.getNullMapContent().getData().resize_fill(size, 0);
return new_col_holder;
}