| 144 | } |
| 145 | |
| 146 | Status ScalarExprEvaluator::Open(RuntimeState* state) { |
| 147 | DCHECK(initialized_); |
| 148 | if (opened_) return Status::OK(); |
| 149 | opened_ = true; |
| 150 | // Fragment-local state is only initialized for original contexts. Clones inherit the |
| 151 | // original's fragment state and only need to have thread-local state initialized. |
| 152 | // TODO: Move FRAGMENT_LOCAL state to ScalarExpr. ScalarExprEvaluator should only |
| 153 | // have THREAD_LOCAL state. |
| 154 | FunctionContext::FunctionStateScope scope = |
| 155 | is_clone_ ? FunctionContext::THREAD_LOCAL : FunctionContext::FRAGMENT_LOCAL; |
| 156 | return root_.OpenEvaluator(scope, state, this); |
| 157 | } |
| 158 | |
| 159 | Status ScalarExprEvaluator::Open( |
| 160 | const vector<ScalarExprEvaluator*>& evals, RuntimeState* state) { |
nothing calls this directly
no test coverage detected