Skip to content

Commit 37d1f73

Browse files
committed
fix type
1 parent 2f8e7af commit 37d1f73

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

python/datafusion/dataframe.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ def join(
452452
raise ValueError(
453453
"either `on` or `left_on` and `right_on` should be provided."
454454
)
455+
if isinstance(left_on, str):
456+
left_on = [left_on]
457+
if isinstance(right_on, str):
458+
right_on = [right_on]
455459

456460
return DataFrame(self.df.join(right.df, how, left_on, right_on))
457461

src/dataframe.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,8 @@ impl PyDataFrame {
290290
}
291291
};
292292

293-
let left_keys = left_on
294-
.iter()
295-
.map(|s| s.as_ref())
296-
.collect::<Vec<&str>>();
297-
let right_keys = right_on
298-
.iter()
299-
.map(|s| s.as_ref())
300-
.collect::<Vec<&str>>();
293+
let left_keys = left_on.iter().map(|s| s.as_ref()).collect::<Vec<&str>>();
294+
let right_keys = right_on.iter().map(|s| s.as_ref()).collect::<Vec<&str>>();
301295

302296
let df = self.df.as_ref().clone().join(
303297
right.df.as_ref().clone(),

0 commit comments

Comments
 (0)