Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for left semi and left anti joins #1182

Merged
merged 15 commits into from
Jun 30, 2023
Prev Previous commit
Next Next commit
Address reviews
  • Loading branch information
Chris Jarrett committed Jun 28, 2023
commit 21690db7e38a6333158ea1040452f8c6a13de360
4 changes: 2 additions & 2 deletions dask_sql/physical/rel/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def convert(self, rel: "LogicalPlan", context: "dask_sql.Context") -> dd.DataFra

@staticmethod
def fix_column_to_row_type(
cc: ColumnContainer, row_type: "RelDataType", join_type: str = None
cc: ColumnContainer, row_type: "RelDataType", join_type: str | None = None
) -> ColumnContainer:
"""
Make sure that the given column container
Expand Down Expand Up @@ -87,7 +87,7 @@ def assert_inputs(

@staticmethod
def fix_dtype_to_row_type(
dc: DataContainer, row_type: "RelDataType", join_type: str = None
dc: DataContainer, row_type: "RelDataType", join_type: str | None = None
):
"""
Fix the dtype of the given data container (or: the df within it)
Expand Down
3 changes: 2 additions & 1 deletion dask_sql/physical/rel/logical/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def convert(self, rel: "LogicalPlan", context: "dask_sql.Context") -> DataContai

join_type = join.getJoinType()
join_type = self.JOIN_TYPE_MAPPING[str(join_type)]
# TODO: update with correct implementation of leftsemi
# TODO: update with correct implementation of leftsemi for CPU
# https://github.com/dask-contrib/dask-sql/issues/1190
if join_type == "leftsemi" and not is_cudf_type(df_lhs_renamed):
join_type = "inner"

Expand Down
Loading