| 1136 | } |
| 1137 | |
| 1138 | Status Execute(const ExecBatch& batch, ExecListener* listener) override { |
| 1139 | RETURN_NOT_OK(span_iterator_.Init(batch, exec_context()->exec_chunksize(), |
| 1140 | /*promote_if_all_scalars=*/false)); |
| 1141 | |
| 1142 | ExecSpan span; |
| 1143 | while (span_iterator_.Next(&span)) { |
| 1144 | // TODO: implement parallelism |
| 1145 | if (span.length > 0) { |
| 1146 | RETURN_NOT_OK(Consume(span)); |
| 1147 | } |
| 1148 | } |
| 1149 | |
| 1150 | Datum out; |
| 1151 | RETURN_NOT_OK(kernel_->finalize(kernel_ctx_, &out)); |
| 1152 | RETURN_NOT_OK(listener->OnResult(std::move(out))); |
| 1153 | return Status::OK(); |
| 1154 | } |
| 1155 | |
| 1156 | Datum WrapResults(const std::vector<Datum>&, |
| 1157 | const std::vector<Datum>& outputs) override { |