| 542 | |
| 543 | namespace { |
| 544 | void ToProtoGetDepthFirstNames(const FieldVector& fields, |
| 545 | google::protobuf::RepeatedPtrField<std::string>* names) { |
| 546 | for (const auto& field : fields) { |
| 547 | *names->Add() = field->name(); |
| 548 | |
| 549 | if (field->type()->id() == Type::STRUCT) { |
| 550 | ToProtoGetDepthFirstNames(field->type()->fields(), names); |
| 551 | } |
| 552 | } |
| 553 | } |
| 554 | } // namespace |
| 555 | |
| 556 | Result<std::unique_ptr<substrait::NamedStruct>> ToProto( |