in src/dataframe.rs [185:214]
fn join(
&self,
right: PyDataFrame,
join_keys: (Vec<&str>, Vec<&str>),
how: &str,
) -> PyResult<Self> {
let join_type = match how {
"inner" => JoinType::Inner,
"left" => JoinType::Left,
"right" => JoinType::Right,
"full" => JoinType::Full,
"semi" => JoinType::LeftSemi,
"anti" => JoinType::LeftAnti,
how => {
return Err(DataFusionError::Common(format!(
"The join type {how} does not exist or is not implemented"
))
.into());
}
};
let df = self.df.as_ref().clone().join(
right.df.as_ref().clone(),
join_type,
&join_keys.0,
&join_keys.1,
None,
)?;
Ok(Self::new(df))
}