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

Function test_table_join_keys_order

python/pyarrow/tests/test_exec_plan.py:197–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195
196
197def test_table_join_keys_order():
198 t1 = pa.table({
199 "colB": [10, 20, 60],
200 "colA": [1, 2, 6],
201 "colVals": ["a", "b", "f"]
202 })
203
204 t2 = pa.table({
205 "colVals": ["Z", "B", "A"],
206 "colX": [99, 2, 1],
207 })
208
209 result = _perform_join("full outer", t1, "colA", t2, "colX",
210 left_suffix="_l", right_suffix="_r",
211 coalesce_keys=True)
212 result = result.combine_chunks()
213 result = result.sort_by("colA")
214 assert result == pa.table({
215 "colB": [10, 20, 60, None],
216 "colA": [1, 2, 6, 99],
217 "colVals_l": ["a", "b", "f", None],
218 "colVals_r": ["A", "B", None, "Z"],
219 })
220
221
222def test_filter_table_errors():

Callers

nothing calls this directly

Calls 1

_perform_joinFunction · 0.90

Tested by

no test coverage detected