[refactor](exceptionsafe) disallow call new method explicitly (#18830)
disallow call new method explicitly force to use create_shared or create_unique to use shared ptr placement new is allowed reference https://abseil.io/tips/42 to add factory method to all class. I think we should follow this guide because if throw exception in new method, the program will terminate. --------- Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
@ -224,7 +224,7 @@ Status VRepeatNode::push(RuntimeState* state, vectorized::Block* input_block, bo
|
||||
DCHECK(!_expr_ctxs.empty());
|
||||
|
||||
if (input_block->rows() > 0) {
|
||||
_intermediate_block.reset(new Block());
|
||||
_intermediate_block = Block::create_unique();
|
||||
|
||||
for (auto expr : _expr_ctxs) {
|
||||
int result_column_id = -1;
|
||||
|
||||
Reference in New Issue
Block a user