| 10 | namespace processor { |
| 11 | |
| 12 | std::unique_ptr<PhysicalOperator> PlanMapper::mapAccumulate( |
| 13 | const LogicalOperator* logicalOperator) { |
| 14 | const auto& acc = logicalOperator->constCast<LogicalAccumulate>(); |
| 15 | auto outSchema = acc.getSchema(); |
| 16 | auto inSchema = acc.getChild(0)->getSchema(); |
| 17 | auto prevOperator = mapOperator(acc.getChild(0).get()); |
| 18 | auto expressions = acc.getPayloads(); |
| 19 | auto resultCollector = createResultCollector(acc.getAccumulateType(), expressions, inSchema, |
| 20 | std::move(prevOperator)); |
| 21 | auto table = resultCollector->getResultFTable(); |
| 22 | auto maxMorselSize = table->hasUnflatCol() ? 1 : DEFAULT_VECTOR_CAPACITY; |
| 23 | if (acc.hasMark()) { |
| 24 | expressions.push_back(acc.getMark()); |
| 25 | } |
| 26 | physical_op_vector_t children; |
| 27 | children.push_back(std::move(resultCollector)); |
| 28 | return createFTableScanAligned(expressions, outSchema, table, maxMorselSize, |
| 29 | std::move(children)); |
| 30 | } |
| 31 | |
| 32 | } // namespace processor |
| 33 | } // namespace lbug |
nothing calls this directly
no test coverage detected