fix build

This commit is contained in:
Nikolai Kochetov 2018-03-19 23:02:27 +03:00
parent c129d922bc
commit 83155130e9
3 changed files with 14 additions and 2 deletions

View File

@ -26,6 +26,11 @@ private:
ColumnNullable(MutableColumnPtr && nested_column_, MutableColumnPtr && null_map_);
ColumnNullable(const ColumnNullable &) = default;
static ColumnPtr createImmutable(const ColumnPtr & nested_column_, const ColumnPtr & null_map_)
{
return ColumnNullable::create(nested_column_->assumeMutable(), null_map_->assumeMutable());
}
public:
const char * getFamilyName() const override { return "Nullable"; }
std::string getName() const override { return "Nullable(" + nested_column->getName() + ")"; }

View File

@ -234,9 +234,15 @@ public:
template <typename... Args>
static MutablePtr create(Args &&... args) { return MutablePtr(new Derived(std::forward<Args>(args)...)); }
template <typename... Args>
static Ptr create(Args &&... args) { return Derived::createImmutable(std::forward<Args>(args)...); }
template <typename T>
static MutablePtr create(std::initializer_list<T> && arg) { return create(std::forward<std::initializer_list<T>>(arg)); }
template <typename T>
static Ptr create(std::initializer_list<T> && arg) { return create(std::forward<std::initializer_list<T>>(arg)); }
typename Base::MutablePtr clone() const override { return typename Base::MutablePtr(new Derived(*derived())); }
};

View File

@ -592,7 +592,7 @@ private:
const ColumnPtr & result_column = temporary_block.getByPosition(3).column;
if (result_column->isColumnNullable())
{
MutableColumnPtr mutable_result_column = result_column->mutate();
MutableColumnPtr mutable_result_column = (*std::move(result_column)).mutate();
static_cast<ColumnNullable &>(*mutable_result_column).applyNullMap(static_cast<const ColumnNullable &>(*arg_cond.column));
block.getByPosition(result).column = std::move(mutable_result_column);
return true;
@ -746,7 +746,8 @@ private:
{
if (arg_else.column->isColumnNullable())
{
auto result_column = arg_else.column->mutate();
auto arg_else_column = arg_else.column;
auto result_column = (*std::move(arg_else_column)).mutate();
static_cast<ColumnNullable &>(*result_column).applyNullMap(static_cast<const ColumnUInt8 &>(*arg_cond.column));
block.getByPosition(result).column = std::move(result_column);
}