()
| 648 | |
| 649 | # 14 should not match, unmatched entry form the right table |
| 650 | def test_outer_join_03(): |
| 651 | t1 = T( |
| 652 | """ |
| 653 | | a | b |
| 654 | 1 | 11 | 111 |
| 655 | 2 | 12 | 112 |
| 656 | 3 | 13 | 113 |
| 657 | 4 | 13 | 114 |
| 658 | """ |
| 659 | ) |
| 660 | |
| 661 | t2 = T( |
| 662 | """ |
| 663 | | c | d |
| 664 | 1 | 11 | 211 |
| 665 | 2 | 12 | 212 |
| 666 | 3 | 13 | 213 |
| 667 | 4 | 14 | 214 |
| 668 | """ |
| 669 | ) |
| 670 | |
| 671 | expected = T( |
| 672 | """ |
| 673 | a | t2_c | s |
| 674 | 11 | 11 | 322 |
| 675 | 12 | 12 | 324 |
| 676 | 13 | 13 | 326 |
| 677 | 13 | 13 | 327 |
| 678 | | 14 | |
| 679 | """ |
| 680 | ).update_types(t2_c=Optional[int]) |
| 681 | |
| 682 | res = t1.join_outer(t2, t1.a == t2.c).select( |
| 683 | t1.a, |
| 684 | t2_c=t2.c, |
| 685 | s=pw.require(t1.b + t2.d, t1.id, t2.id), |
| 686 | ) |
| 687 | assert_table_equality_wo_index(res, expected) |
| 688 | |
| 689 | |
| 690 | def test_outer_join_04(): |
nothing calls this directly
no test coverage detected