MCPcopy Create free account
hub / github.com/apache/impala / Create

Method Create

be/src/exprs/scalar-expr.cc:80–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80Status ScalarExpr::Create(const TExpr& texpr, const RowDescriptor& row_desc,
81 FragmentState* state, ObjectPool* pool, ScalarExpr** scalar_expr) {
82 *scalar_expr = nullptr;
83 ScalarExpr* root;
84 RETURN_IF_ERROR(CreateNode(texpr.nodes[0], pool, &root));
85 RETURN_IF_ERROR(Expr::CreateTree(texpr, pool, root));
86 // Assume that the root is a potential entry point for interpreted callers.
87 // This is not always true but would require some work to determine for
88 // each of the callsites of Create().
89 // TODO: fix this - reducing the number of entry points would reduce codegen overhead
90 // somewhat.
91 Status status = root->Init(row_desc, /*is_entry_point*/ true, state);
92 if (UNLIKELY(!status.ok())) {
93 root->Close();
94 return status;
95 }
96 int fn_ctx_idx = 0;
97 root->AssignFnCtxIdx(&fn_ctx_idx);
98 *scalar_expr = root;
99 return Status::OK();
100}
101
102Status ScalarExpr::Create(const vector<TExpr>& texprs, const RowDescriptor& row_desc,
103 FragmentState* state, ObjectPool* pool, vector<ScalarExpr*>* exprs) {

Callers

nothing calls this directly

Calls 9

OKFunction · 0.85
CreateClass · 0.85
push_backMethod · 0.80
clearMethod · 0.65
InitMethod · 0.45
okMethod · 0.45
CloseMethod · 0.45
AssignFnCtxIdxMethod · 0.45
obj_poolMethod · 0.45

Tested by

no test coverage detected