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

Method addRawInput

bolt/python/Aggregate.cpp:194–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void PythonAggregate::addRawInput(
195 char** groups,
196 const SelectivityVector& rows,
197 const std::vector<VectorPtr>& args,
198 bool mayPushdown) {
199 rows.applyToSelected([&](vector_size_t i) {
200 auto& lhs = *value<std::unique_ptr<pybind11::object>>(groups[i]);
201 pybind11::object rhs = [&]() {
202 pybind11::list columns;
203 for (auto& vec : args) {
204 columns.append(vec->loadedVector()->slice(i, 1));
205 }
206 return aggregate(aggregatorClass_, std::move(columns));
207 }();
208
209 accumulate(*lhs, rhs);
210 });
211}
212
213void PythonAggregate::extractAccumulators(
214 char** groups,

Callers

nothing calls this directly

Calls 6

aggregateFunction · 0.85
accumulateFunction · 0.85
applyToSelectedMethod · 0.80
appendMethod · 0.45
sliceMethod · 0.45
loadedVectorMethod · 0.45

Tested by

no test coverage detected