MCPcopy
hub / github.com/pathwaycom/pathway / test_left_join_universe_asserts

Function test_left_join_universe_asserts

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

Source from the content-addressed store, hash-verified

63
64
65def test_left_join_universe_asserts():
66 t1 = T(
67 """
68 | a | b
69 1 | 11 | 111
70 2 | 12 | 112
71 3 | 13 | 113
72 4 | 14 | 114
73 """
74 )
75
76 t2 = T(
77 """
78 | a | d
79 1 | 11 | 211
80 2 | 12 | 212
81 3 | 13 | 213
82 4 | 14 | 214
83 """
84 )
85
86 xxx = t1.join_left(t2, t1.a == t2.a)
87 yyy = t1.join_left(t2, t1.a == t2.a)
88 pw.universes.promise_are_equal(xxx, yyy)
89
90 res_x = xxx.select(
91 t1.a,
92 t2_a=t2.a,
93 s=pw.require(t1.b + t2.d, t1.id, t2.id),
94 )
95 res_y = yyy.select(
96 t1.a,
97 t2_a=t2.a,
98 s=pw.require(t1.b + t2.d, t1.id, t2.id),
99 )
100 assert_table_equality_wo_index(res_x, res_y)
101
102
103def test_left_join_015():

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
join_leftMethod · 0.80
selectMethod · 0.45

Tested by

no test coverage detected