(tempdir)
| 5463 | |
| 5464 | @pytest.mark.dataset |
| 5465 | def test_dataset_join_asof_collisions(tempdir): |
| 5466 | t1 = pa.table({ |
| 5467 | "colA": [1, 2, 6], |
| 5468 | "colB": [10, 20, 60], |
| 5469 | "on": [1, 2, 3], |
| 5470 | "colVals": ["a", "b", "f"] |
| 5471 | }) |
| 5472 | ds.write_dataset(t1, tempdir / "t1", format="ipc") |
| 5473 | ds1 = ds.dataset(tempdir / "t1", format="ipc") |
| 5474 | |
| 5475 | t2 = pa.table({ |
| 5476 | "colB": [99, 20, 10], |
| 5477 | "colVals": ["Z", "B", "A"], |
| 5478 | "colUniq": [100, 200, 300], |
| 5479 | "colA": [99, 2, 1], |
| 5480 | "on": [2, 3, 4], |
| 5481 | }) |
| 5482 | ds.write_dataset(t2, tempdir / "t2", format="ipc") |
| 5483 | ds2 = ds.dataset(tempdir / "t2", format="ipc") |
| 5484 | |
| 5485 | msg = ( |
| 5486 | "Columns {'colVals'} present in both tables. " |
| 5487 | "AsofJoin does not support column collisions." |
| 5488 | ) |
| 5489 | with pytest.raises(ValueError, match=msg): |
| 5490 | ds1.join_asof( |
| 5491 | ds2, on="on", by=["colA", "colB"], tolerance=1, |
| 5492 | right_on="on", right_by=["colA", "colB"], |
| 5493 | ) |
| 5494 | |
| 5495 | |
| 5496 | @pytest.mark.parametrize('dstype', [ |
nothing calls this directly
no outgoing calls
no test coverage detected