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

Function test_right_join_02

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

Source from the content-addressed store, hash-verified

266
267# 14 should not match
268def test_right_join_02():
269 t1 = T(
270 """
271 | a | b
272 1 | 11 | 111
273 2 | 12 | 112
274 3 | 13 | 113
275 4 | 13 | 114
276 """
277 )
278
279 t2 = T(
280 """
281 | c | d
282 1 | 11 | 211
283 2 | 12 | 212
284 3 | 13 | 213
285 4 | 14 | 214
286 """
287 )
288
289 expected = T(
290 """
291 a | t2_c | s
292 11 | 11 | 322
293 12 | 12 | 324
294 13 | 13 | 326
295 13 | 13 | 327
296 | 14 |
297 """
298 )
299
300 res = t1.join_right(t2, t1.a == t2.c).select(
301 t1.a,
302 t2_c=t2.c,
303 s=pw.require(t1.b + t2.d, t1.id),
304 )
305 assert_table_equality_wo_index(res, expected)
306
307
308# filling in computable columns

Callers

nothing calls this directly

Calls 3

TFunction · 0.90
join_rightMethod · 0.80
selectMethod · 0.45

Tested by

no test coverage detected