| 548 | } |
| 549 | |
| 550 | void CheckScannedBatches(RecordBatchVector batches) { |
| 551 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<Table> batches_as_table, |
| 552 | Table::FromRecordBatches(std::move(batches))); |
| 553 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<RecordBatch> combined_data, |
| 554 | batches_as_table->CombineChunksToBatch()); |
| 555 | |
| 556 | ASSERT_OK_AND_ASSIGN( |
| 557 | std::shared_ptr<Array> sort_indices, |
| 558 | compute::SortIndices(combined_data->column(0), compute::SortOptions{})); |
| 559 | ASSERT_OK_AND_ASSIGN(Datum sorted_data, compute::Take(combined_data, sort_indices)); |
| 560 | |
| 561 | std::shared_ptr<RecordBatch> expected_data = MakeExpectedBatch(); |
| 562 | AssertBatchesEqual(*expected_data, *sorted_data.record_batch()); |
| 563 | } |
| 564 | |
| 565 | void CheckScanner(bool ordered) { |
| 566 | std::shared_ptr<MockDataset> mock_dataset = |
nothing calls this directly
no test coverage detected