MCPcopy Create free account
hub / github.com/apache/arrow / test_table_join_unique_key

Function test_table_join_unique_key

python/pyarrow/tests/test_table.py:3199–3222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3197
3198@pytest.mark.acero
3199def test_table_join_unique_key():
3200 t1 = pa.table({
3201 "colA": [1, 2, 6],
3202 "col2": ["a", "b", "f"]
3203 })
3204
3205 t2 = pa.table({
3206 "colA": [99, 2, 1],
3207 "col3": ["Z", "B", "A"]
3208 })
3209
3210 result = t1.join(t2, "colA")
3211 assert result.combine_chunks() == pa.table({
3212 "colA": [1, 2, 6],
3213 "col2": ["a", "b", "f"],
3214 "col3": ["A", "B", None]
3215 })
3216
3217 result = t1.join(t2, "colA", join_type="full outer", right_suffix="_r")
3218 assert result.combine_chunks().sort_by("colA") == pa.table({
3219 "colA": [1, 2, 6, 99],
3220 "col2": ["a", "b", "f", None],
3221 "col3": ["A", "B", None, "Z"]
3222 })
3223
3224
3225@pytest.mark.acero

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected