| 418 | } |
| 419 | |
| 420 | Result<EnumeratedRecordBatch> ToEnumeratedRecordBatch( |
| 421 | const std::optional<compute::ExecBatch>& batch, const ScanOptions& options, |
| 422 | const FragmentVector& fragments) { |
| 423 | int num_fields = options.projected_schema->num_fields(); |
| 424 | |
| 425 | EnumeratedRecordBatch out; |
| 426 | out.fragment.index = batch->values[num_fields].scalar_as<Int32Scalar>().value; |
| 427 | out.fragment.last = false; // ignored during reordering |
| 428 | out.fragment.value = fragments[out.fragment.index]; |
| 429 | |
| 430 | out.record_batch.index = batch->values[num_fields + 1].scalar_as<Int32Scalar>().value; |
| 431 | out.record_batch.last = batch->values[num_fields + 2].scalar_as<BooleanScalar>().value; |
| 432 | ARROW_ASSIGN_OR_RAISE(out.record_batch.value, |
| 433 | batch->ToRecordBatch(options.projected_schema, options.pool)); |
| 434 | return out; |
| 435 | } |
| 436 | |
| 437 | Result<EnumeratedRecordBatchGenerator> AsyncScanner::ScanBatchesUnorderedAsync( |
| 438 | Executor* cpu_executor, bool sequence_fragments, bool use_legacy_batching) { |
no test coverage detected