[refactor](exceptionsafe) add factory creator to some class (#18978)

make vexprecontext,vexpr,function,query context,runtimestate thread safe.


---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
yiguolei
2023-04-24 10:32:11 +08:00
committed by GitHub
parent 8e4710079d
commit 8d7a9fd21b
62 changed files with 194 additions and 101 deletions

View File

@ -28,12 +28,14 @@
namespace doris::vectorized {
class VLambdaFunctionCallExpr : public VExpr {
ENABLE_FACTORY_CREATOR(VLambdaFunctionCallExpr);
public:
VLambdaFunctionCallExpr(const TExprNode& node) : VExpr(node) {}
~VLambdaFunctionCallExpr() override = default;
VExpr* clone(ObjectPool* pool) const override {
return pool->add(new VLambdaFunctionCallExpr(*this));
return pool->add(VLambdaFunctionCallExpr::create_unique(*this).release());
}
doris::Status prepare(doris::RuntimeState* state, const doris::RowDescriptor& desc,