| 642 | } |
| 643 | |
| 644 | Result<std::shared_ptr<Partitioning>> Finish( |
| 645 | const std::shared_ptr<Schema>& schema) const override { |
| 646 | for (FieldRef ref : field_names_) { |
| 647 | // ensure all of field_names_ are present in schema |
| 648 | RETURN_NOT_OK(ref.FindOne(*schema).status()); |
| 649 | } |
| 650 | |
| 651 | // drop fields which aren't in field_names_ |
| 652 | auto out_schema = SchemaFromColumnNames(schema, field_names_); |
| 653 | |
| 654 | return std::make_shared<FilenamePartitioning>(std::move(out_schema), dictionaries_, |
| 655 | options_.AsPartitioningOptions()); |
| 656 | } |
| 657 | |
| 658 | private: |
| 659 | void Reset() override { |
nothing calls this directly
no test coverage detected