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

Function test_table_join

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

Source from the content-addressed store, hash-verified

3170
3171@pytest.mark.acero
3172def test_table_join():
3173 t1 = pa.table({
3174 "colA": [1, 2, 6],
3175 "col2": ["a", "b", "f"]
3176 })
3177
3178 t2 = pa.table({
3179 "colB": [99, 2, 1],
3180 "col3": ["Z", "B", "A"]
3181 })
3182
3183 result = t1.join(t2, "colA", "colB")
3184 assert result.combine_chunks() == pa.table({
3185 "colA": [1, 2, 6],
3186 "col2": ["a", "b", "f"],
3187 "col3": ["A", "B", None]
3188 })
3189
3190 result = t1.join(t2, "colA", "colB", join_type="full outer")
3191 assert result.combine_chunks().sort_by("colA") == pa.table({
3192 "colA": [1, 2, 6, 99],
3193 "col2": ["a", "b", "f", None],
3194 "col3": ["A", "B", None, "Z"]
3195 })
3196
3197
3198@pytest.mark.acero

Callers

nothing calls this directly

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected