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

Method Open

be/src/exprs/agg-fn-evaluator.cc:155–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155Status AggFnEvaluator::Open(RuntimeState* state) {
156 if (opened_) return Status::OK();
157 opened_ = true;
158 RETURN_IF_ERROR(ScalarExprEvaluator::Open(input_evals_, state));
159 // Now that we have opened all our input exprs, it is safe to evaluate any constant
160 // values for the UDA's FunctionContext (we cannot evaluate exprs before calling Open()
161 // on them).
162 vector<AnyVal*> constant_args(input_evals_.size(), nullptr);
163 for (int i = 0; i < input_evals_.size(); ++i) {
164 ScalarExprEvaluator* eval = input_evals_[i];
165 RETURN_IF_ERROR(eval->GetConstValue(state, *(agg_fn_.GetChild(i)),
166 &constant_args[i]));
167 }
168 agg_fn_ctx_->impl()->SetConstantArgs(move(constant_args));
169 return Status::OK();
170}
171
172Status AggFnEvaluator::Open(
173 const vector<AggFnEvaluator*>& evals, RuntimeState* state) {

Callers 2

TEST_PFunction · 0.45

Calls 7

OKFunction · 0.85
moveFunction · 0.85
GetConstValueMethod · 0.80
GetChildMethod · 0.80
implMethod · 0.80
sizeMethod · 0.45
SetConstantArgsMethod · 0.45

Tested by 2

TEST_PFunction · 0.36