| 646 | } |
| 647 | |
| 648 | std::vector<std::shared_ptr<Array>> ConstructJoinOutputFromRowIds( |
| 649 | ExecContext* ctx, const std::vector<int32_t>& row_ids_l, |
| 650 | const std::vector<int32_t>& row_ids_r, const std::vector<std::shared_ptr<Array>>& l, |
| 651 | const std::vector<std::shared_ptr<Array>>& r, |
| 652 | const std::vector<int>& shuffle_output_l, const std::vector<int>& shuffle_output_r) { |
| 653 | std::vector<std::shared_ptr<Array>> full_output_l; |
| 654 | std::vector<std::shared_ptr<Array>> full_output_r; |
| 655 | TakeUsingVector(ctx, l, row_ids_l, &full_output_l); |
| 656 | TakeUsingVector(ctx, r, row_ids_r, &full_output_r); |
| 657 | std::vector<std::shared_ptr<Array>> result; |
| 658 | result.resize(shuffle_output_l.size() + shuffle_output_r.size()); |
| 659 | for (size_t i = 0; i < shuffle_output_l.size(); ++i) { |
| 660 | result[i] = full_output_l[shuffle_output_l[i]]; |
| 661 | } |
| 662 | for (size_t i = 0; i < shuffle_output_r.size(); ++i) { |
| 663 | result[shuffle_output_l.size() + i] = full_output_r[shuffle_output_r[i]]; |
| 664 | } |
| 665 | return result; |
| 666 | } |
| 667 | |
| 668 | BatchesWithSchema TableToBatches(Random64Bit& rng, int num_batches, |
| 669 | const std::vector<std::shared_ptr<Array>>& table, |
no test coverage detected