MCPcopy Create free account
hub / github.com/bytedance/bolt / evaluateMultipleWithStats

Method evaluateMultipleWithStats

bolt/expression/tests/ExprTest.cpp:156–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154 }
155
156 std::pair<
157 std::vector<VectorPtr>,
158 std::unordered_map<std::string, exec::ExprStats>>
159 evaluateMultipleWithStats(
160 const std::vector<std::string>& texts,
161 const RowVectorPtr& input,
162 std::vector<VectorPtr> resultToReuse = {}) {
163 auto exprSet = compileMultiple(texts, asRowType(input->type()));
164
165 exec::EvalCtx context(execCtx_.get(), exprSet.get(), input.get());
166
167 SelectivityVector rows(input->size());
168 if (resultToReuse.empty()) {
169 resultToReuse.resize(texts.size());
170 }
171 exprSet->eval(rows, context, resultToReuse);
172 return {resultToReuse, exprSet->stats()};
173 }
174
175 VectorPtr evaluate(const std::string& text, const RowVectorPtr& input) {
176 return evaluateMultiple({text}, input)[0];

Callers

nothing calls this directly

Calls 8

asRowTypeFunction · 0.85
typeMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
resizeMethod · 0.45
evalMethod · 0.45
statsMethod · 0.45

Tested by

no test coverage detected