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

Function createRowVector

bolt/expression/tests/ExpressionRunner.cpp:51–68  ·  view source on GitHub ↗

Creates a RowVector from a list of child vectors. Uses _col0, _col1,.. auto-generated names for the RowType.

Source from the content-addressed store, hash-verified

49/// Creates a RowVector from a list of child vectors. Uses _col0, _col1,..
50/// auto-generated names for the RowType.
51RowVectorPtr createRowVector(
52 const std::vector<VectorPtr>& vectors,
53 vector_size_t size,
54 memory::MemoryPool* pool) {
55 auto n = vectors.size();
56
57 std::vector<std::string> names;
58 names.reserve(n);
59 std::vector<TypePtr> types;
60 types.reserve(n);
61 for (auto i = 0; i < n; ++i) {
62 names.push_back(fmt::format("_col{}", i));
63 types.push_back(vectors[i]->type());
64 }
65
66 return std::make_shared<RowVector>(
67 pool, ROW(std::move(names), std::move(types)), nullptr, size, vectors);
68}
69
70RowVectorPtr evaluateAndPrintResults(
71 exec::ExprSet& exprSet,

Callers 3

evaluateAndPrintResultsFunction · 0.70
applyMethod · 0.50
applyNoThrowMethod · 0.50

Calls 5

ROWFunction · 0.85
sizeMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected