| 636 | } |
| 637 | |
| 638 | static std::vector<ResolvedSortKey> ResolveSortKeys( |
| 639 | const Table& table, const RecordBatchVector& batches, |
| 640 | const std::vector<SortKey>& sort_keys, Status* status) { |
| 641 | const auto maybe_resolved = ResolvedSortKey::Make(table, batches, sort_keys); |
| 642 | if (!maybe_resolved.ok()) { |
| 643 | *status = maybe_resolved.status(); |
| 644 | return {}; |
| 645 | } |
| 646 | return *std::move(maybe_resolved); |
| 647 | } |
| 648 | |
| 649 | Status SortInternal() { |
| 650 | // Sort each batch independently and merge to sorted indices. |