(how, shuffle_method)
| 129 | @pytest.mark.parametrize("how", ["left", "right", "inner", "outer"]) |
| 130 | @pytest.mark.parametrize("shuffle_method", ["tasks", "disk"]) |
| 131 | def test_join(how, shuffle_method): |
| 132 | # Make simple left & right dfs |
| 133 | pdf1 = pd.DataFrame({"x": range(20), "y": range(20)}) |
| 134 | df1 = from_pandas(pdf1, 4) |
| 135 | pdf2 = pd.DataFrame({"z": range(10)}, index=pd.Index(range(10), name="a")) |
| 136 | df2 = from_pandas(pdf2, 2) |
| 137 | |
| 138 | # Partition-wise merge with map_partitions |
| 139 | df3 = df1.join(df2, on="x", how=how, shuffle_method=shuffle_method) |
| 140 | |
| 141 | # Check result with/without fusion |
| 142 | expect = pdf1.join(pdf2, on="x", how=how) |
| 143 | assert_eq(df3.compute(), expect, check_index=False) |
| 144 | assert_eq(df3.optimize(), expect, check_index=False) |
| 145 | |
| 146 | df3 = df1.join(df2.z, on="x", how=how, shuffle_method=shuffle_method) |
| 147 | assert_eq(df3, expect, check_index=False) |
| 148 | assert_eq(df3.optimize(), expect, check_index=False) |
| 149 | |
| 150 | |
| 151 | def test_join_recursive(): |
nothing calls this directly
no test coverage detected