Jimexist commented on code in PR #324:
URL:
https://github.com/apache/arrow-datafusion-python/pull/324#discussion_r1165115002
##########
src/dataframe.rs:
##########
@@ -212,6 +212,39 @@ impl PyDataFrame {
Ok(Self::new(df))
}
+ /// Thin wrapper for datafusion-rust `join_on`
+ /// Slightly modified from original `join` above.
+ fn join_on(
+ &self,
+ right: PyDataFrame,
+ on_exprs: Vec<PyExpr>,
+ 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());
+ }
Review Comment:
shouldn't this be covered by the
https://doc.rust-lang.org/std/str/trait.FromStr.html impl for the enum?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]