| 46 | std::vector<std::optional<FieldPath>> measurement_paths; |
| 47 | |
| 48 | static Result<BoundRowTemplate> Make(const PivotLongerRowTemplate& unbound, |
| 49 | const Schema& schema) { |
| 50 | std::vector<std::optional<FieldPath>> measurement_paths; |
| 51 | for (const auto& meas_ref : unbound.measurement_values) { |
| 52 | if (meas_ref) { |
| 53 | ARROW_ASSIGN_OR_RAISE(FieldPath meas_path, meas_ref->FindOne(schema)); |
| 54 | if (meas_path.indices().size() > 1) { |
| 55 | // This should actually be pretty easy to add. Just need to figure out how to |
| 56 | // convert from a nested measurement ref to a column in an exec batch |
| 57 | return Status::NotImplemented("nested measurement refs in pivot longer node"); |
| 58 | } |
| 59 | measurement_paths.push_back(std::move(meas_path)); |
| 60 | } else { |
| 61 | measurement_paths.push_back(std::nullopt); |
| 62 | } |
| 63 | } |
| 64 | return BoundRowTemplate(unbound.feature_values, std::move(measurement_paths)); |
| 65 | } |
| 66 | |
| 67 | private: |
| 68 | BoundRowTemplate(std::vector<std::string> feature_values, |
nothing calls this directly
no test coverage detected