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

Function test_table_join_asof_collisions

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

Source from the content-addressed store, hash-verified

3397
3398@pytest.mark.dataset
3399def test_table_join_asof_collisions():
3400 t1 = pa.table({
3401 "colA": [1, 2, 6],
3402 "colB": [10, 20, 60],
3403 "on": [1, 2, 3],
3404 "colVals": ["a", "b", "f"]
3405 })
3406
3407 t2 = pa.table({
3408 "colB": [99, 20, 10],
3409 "colVals": ["Z", "B", "A"],
3410 "colUniq": [100, 200, 300],
3411 "colA": [99, 2, 1],
3412 "on": [2, 3, 4],
3413 })
3414
3415 msg = (
3416 "Columns {'colVals'} present in both tables. "
3417 "AsofJoin does not support column collisions."
3418 )
3419 with pytest.raises(ValueError, match=msg):
3420 t1.join_asof(
3421 t2, on="on", by=["colA", "colB"], tolerance=1,
3422 right_on="on", right_by=["colA", "colB"],
3423 )
3424
3425
3426@pytest.mark.dataset

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected