Skip to content

Commit 385091d

Browse files
committed
Check if value is None because [] don't trigger the intended behavior
1 parent 3bd30a0 commit 385091d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/datafusion/dataframe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,14 +446,14 @@ def join(
446446
left_on = join_keys[0]
447447
right_on = join_keys[1]
448448

449-
if on:
450-
if left_on or right_on:
449+
if on is not None:
450+
if left_on is not None or right_on is not None:
451451
raise ValueError(
452452
"`left_on` or `right_on` should not provided with `on`"
453453
)
454454
left_on = on
455455
right_on = on
456-
elif left_on or right_on:
456+
elif left_on is not None or right_on is not None:
457457
if left_on is None or right_on is None:
458458
raise ValueError("`left_on` and `right_on` should both be provided.")
459459
else:

0 commit comments

Comments
 (0)