fix build

This commit is contained in:
Nikolai Kochetov 2018-03-19 22:09:37 +03:00
parent 10ea41f720
commit a4dd6602d2
3 changed files with 15 additions and 13 deletions

View File

@ -540,7 +540,7 @@ private:
temporary_block.insert(block.getByPosition(arguments[0]));
size_t tuple_size = type1.getElements().size();
Columns tuple_columns(tuple_size);
MutableColumns tuple_columns(tuple_size);
for (size_t i = 0; i < tuple_size; ++i)
{
@ -556,12 +556,12 @@ private:
temporary_block.erase(i + 3);
temporary_block.erase(i + 2);
tuple_columns[i] = temporary_block.getByPosition(i + 1).column;
tuple_columns[i] = temporary_block.getByPosition(i + 1).column->assumeMutable();
}
/// temporary_block is: cond, res_0, res_1, res_2...
block.getByPosition(result).column = ColumnTuple::create(tuple_columns);
block.getByPosition(result).column = ColumnTuple::create(std::move(tuple_columns));
return true;
}
@ -605,7 +605,8 @@ private:
else
{
block.getByPosition(result).column = ColumnNullable::create(
materializeColumnIfConst(result_column), static_cast<const ColumnNullable &>(*arg_cond.column).getNullMapColumnPtr());
materializeColumnIfConst(result_column)->assumeMutable(),
static_cast<const ColumnNullable &>(*arg_cond.column).getNullMapColumnPtr()->assumeMutable());
return true;
}
}
@ -626,7 +627,7 @@ private:
return column;
return ColumnNullable::create(
materializeColumnIfConst(column), ColumnUInt8::create(column->size(), 0));
materializeColumnIfConst(column)->assumeMutable(), ColumnUInt8::create(column->size(), 0));
}
static ColumnPtr getNestedColumn(const ColumnPtr & column)
@ -712,7 +713,8 @@ private:
}
block.getByPosition(result).column = ColumnNullable::create(
materializeColumnIfConst(result_nested_column), materializeColumnIfConst(result_null_mask));
materializeColumnIfConst(result_nested_column)->assumeMutable(),
materializeColumnIfConst(result_null_mask)->assumeMutable());
return true;
}

View File

@ -1336,7 +1336,7 @@ private:
nested_function(nested_block, {0}, 1);
/// set converted nested column to result
block.getByPosition(result).column = ColumnArray::create(nested_block.getByPosition(1).column, col_array->getOffsetsPtr());
block.getByPosition(result).column = ColumnArray::create(nested_block.getByPosition(1).column->assumeMutable(), col_array->getOffsetsPtr());
}
else
throw Exception{"Illegal column " + array_arg.column->getName() + " for function CAST AS Array", ErrorCodes::LOGICAL_ERROR};
@ -1399,11 +1399,11 @@ private:
idx_element_wrapper.second(element_block, { idx_element_wrapper.first },
tuple_size + idx_element_wrapper.first);
Columns converted_columns(tuple_size);
MutableColumns converted_columns(tuple_size);
for (size_t i = 0; i < tuple_size; ++i)
converted_columns[i] = element_block.getByPosition(tuple_size + i).column;
converted_columns[i] = element_block.getByPosition(tuple_size + i).column->assumeMutable();
block.getByPosition(result).column = ColumnTuple::create(converted_columns);
block.getByPosition(result).column = ColumnTuple::create(std::move(converted_columns));
};
}
@ -1587,7 +1587,7 @@ private:
}
const auto & tmp_res = tmp_block.getByPosition(tmp_res_index);
res.column = ColumnNullable::create(tmp_res.column, null_map);
res.column = ColumnNullable::create(tmp_res.column->assumeMutable(), null_map->assumeMutable());
};
}
else if (nullable_conversion.source_is_nullable)

View File

@ -50,7 +50,7 @@ struct ArrayMapImpl
{
return mapped->isColumnConst()
? ColumnArray::create(mapped->convertToFullColumnIfConst(), array.getOffsetsPtr())
: ColumnArray::create(mapped, array.getOffsetsPtr());
: ColumnArray::create(mapped->assumeMutable(), array.getOffsetsPtr());
}
};
@ -104,7 +104,7 @@ struct ArrayFilterImpl
out_offsets[i] = out_pos;
}
return ColumnArray::create(filtered, std::move(column_offsets));
return ColumnArray::create(filtered->assumeMutable(), std::move(column_offsets));
}
};