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

Function test_left_join_02

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

Source from the content-addressed store, hash-verified

140
141# 14 should not match
142def test_left_join_02():
143 t1 = T(
144 """
145 | a | b
146 1 | 11 | 111
147 2 | 12 | 112
148 3 | 13 | 113
149 4 | 14 | 114
150 """
151 )
152
153 t2 = T(
154 """
155 | c | d
156 1 | 11 | 211
157 2 | 12 | 212
158 3 | 13 | 213
159 4 | 13 | 214
160 """
161 )
162
163 expected = T(
164 """
165 a | t2_c | s
166 11 | 11 | 322
167 12 | 12 | 324
168 13 | 13 | 326
169 13 | 13 | 327
170 14 | |
171 """
172 )
173
174 res = t1.join_left(t2, t1.a == t2.c).select(
175 t1.a,
176 t2_c=t2.c,
177 s=pw.require(t1.b + t2.d, t2.id),
178 )
179 assert_table_equality_wo_index(res, expected)
180
181
182# filling in computable columns

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
join_leftMethod · 0.80
selectMethod · 0.45

Tested by

no test coverage detected