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

Function test_table_join_asof_by_length_mismatch

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

Source from the content-addressed store, hash-verified

3425
3426@pytest.mark.dataset
3427def test_table_join_asof_by_length_mismatch():
3428 t1 = pa.table({
3429 "colA": [1, 2, 6],
3430 "colB": [10, 20, 60],
3431 "on": [1, 2, 3],
3432 })
3433
3434 t2 = pa.table({
3435 "colVals": ["Z", "B", "A"],
3436 "colUniq": [100, 200, 300],
3437 "colA": [99, 2, 1],
3438 "on": [2, 3, 4],
3439 })
3440
3441 msg = "inconsistent size of by-key across inputs"
3442 with pytest.raises(pa.lib.ArrowInvalid, match=msg):
3443 t1.join_asof(
3444 t2, on="on", by=["colA", "colB"], tolerance=1,
3445 right_on="on", right_by=["colA"],
3446 )
3447
3448
3449@pytest.mark.dataset

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected