MCPcopy Index your code
hub / github.com/pathwaycom/pathway / test_outer_join_04

Function test_outer_join_04

python/pathway/tests/test_joins.py:690–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

688
689
690def test_outer_join_04():
691 t1 = T(
692 """
693 | a | b
694 1 | 11 | 111
695 2 | 12 | 112
696 3 | 13 | 113
697 4 | 13 | 114
698 """
699 )
700
701 t2 = T(
702 """
703 | c | d
704 1 | 11 | 211
705 2 | 12 | 212
706 3 | 14 | 213
707 4 | 14 | 214
708 """
709 )
710
711 expected = T(
712 """
713 a | t2_c | s
714 11 | 11 | 322
715 12 | 12 | 324
716 13 | |
717 13 | |
718 | 14 |
719 | 14 |
720 """
721 )
722
723 res = t1.join_outer(t2, t1.a == t2.c).select(
724 t1.a,
725 t2_c=t2.c,
726 s=pw.require(t1.b + t2.d, t1.id, t2.id),
727 )
728 assert_table_equality_wo_index(res, expected)
729
730
731def test_outer_join_smart_cols():

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
join_outerMethod · 0.80
selectMethod · 0.45

Tested by

no test coverage detected