| 233 | Status StopProducingImpl() override { return Status::OK(); } |
| 234 | |
| 235 | ExecBatch ApplyTemplate(const BoundRowTemplate& templ, const ExecBatch& input) const { |
| 236 | std::vector<Datum> values(input.values); |
| 237 | for (const auto& feature_val : templ.feature_values) { |
| 238 | // Feature names are added as string scalars |
| 239 | values.push_back(Datum(feature_val)); |
| 240 | } |
| 241 | for (std::size_t meas_idx = 0; meas_idx < templ.measurement_paths.size(); |
| 242 | meas_idx++) { |
| 243 | const std::optional<FieldPath>& opt_meas_path = templ.measurement_paths[meas_idx]; |
| 244 | if (opt_meas_path) { |
| 245 | values.push_back(input.values[opt_meas_path->indices()[0]]); |
| 246 | } else { |
| 247 | values.push_back(MakeNullScalar(meas_types_[meas_idx])); |
| 248 | } |
| 249 | } |
| 250 | return ExecBatch(std::move(values), input.length); |
| 251 | } |
| 252 | |
| 253 | Status InputReceived(ExecNode* input, ExecBatch batch) override { |
| 254 | auto scope = TraceInputReceived(batch); |