()
| 284 | |
| 285 | |
| 286 | def test_join_extension_array_column(): |
| 287 | storage = pa.array([1, 2, 3], type=pa.int64()) |
| 288 | ty = IntegerType() |
| 289 | ext_array = pa.ExtensionArray.from_storage(ty, storage) |
| 290 | dict_array = pa.DictionaryArray.from_arrays( |
| 291 | pa.array([0, 2, 1]), pa.array(['a', 'b', 'c'])) |
| 292 | t1 = pa.table({ |
| 293 | "colA": [1, 2, 6], |
| 294 | "colB": ext_array, |
| 295 | "colVals": ext_array, |
| 296 | }) |
| 297 | |
| 298 | t2 = pa.table({ |
| 299 | "colA": [99, 2, 1], |
| 300 | "colC": ext_array, |
| 301 | }) |
| 302 | |
| 303 | t3 = pa.table({ |
| 304 | "colA": [99, 2, 1], |
| 305 | "colC": ext_array, |
| 306 | "colD": dict_array, |
| 307 | }) |
| 308 | |
| 309 | result = _perform_join( |
| 310 | "left outer", t1, ["colA"], t2, ["colA"]) |
| 311 | assert result["colVals"] == pa.chunked_array(ext_array) |
| 312 | |
| 313 | result = _perform_join( |
| 314 | "left outer", t1, ["colB"], t2, ["colC"]) |
| 315 | assert result["colB"] == pa.chunked_array(ext_array) |
| 316 | |
| 317 | result = _perform_join( |
| 318 | "left outer", t1, ["colA"], t3, ["colA"]) |
| 319 | assert result["colVals"] == pa.chunked_array(ext_array) |
| 320 | |
| 321 | result = _perform_join( |
| 322 | "left outer", t1, ["colB"], t3, ["colC"]) |
| 323 | assert result["colB"] == pa.chunked_array(ext_array) |
| 324 | |
| 325 | |
| 326 | def test_group_by_ordering(): |
nothing calls this directly
no test coverage detected