Skip to content

Commit

Permalink
Init common_type
Browse files Browse the repository at this point in the history
  • Loading branch information
shwina committed Mar 17, 2021
1 parent 328dafd commit 297d20a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/cudf/cudf/core/join/_join_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ def _frame_select_by_indexers(


def _match_join_keys(lcol: ColumnBase, rcol: ColumnBase, how: str) -> Dtype:
# cast the keys lcol and rcol to a common dtype
common_type = None

# cast the keys lcol and rcol to a common dtype
ltype = lcol.dtype
rtype = rcol.dtype

Expand Down Expand Up @@ -109,10 +110,7 @@ def _match_join_keys(lcol: ColumnBase, rcol: ColumnBase, how: str) -> Dtype:
"upcasting to {common_type}."
)

if common_type:
return common_type

return None
return common_type


def _match_categorical_dtypes(ltype: Dtype, rtype: Dtype, how: str) -> Dtype:
Expand Down

0 comments on commit 297d20a

Please sign in to comment.