Skip to content

Commit 8fbaa3a

Browse files
committed
update datafusion to 5.1.0 for python binding
1 parent 7932cb9 commit 8fbaa3a

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

python/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# under the License.
1717

1818
[package]
19-
name = "datafusion"
19+
name = "datafusion-python"
2020
version = "0.3.0"
2121
homepage = "https://github.com/apache/arrow"
2222
repository = "https://github.com/apache/arrow"
@@ -31,7 +31,8 @@ libc = "0.2"
3131
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync"] }
3232
rand = "0.7"
3333
pyo3 = { version = "0.14.1", features = ["extension-module", "abi3", "abi3-py36"] }
34-
datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev = "4d61196dee8526998aee7e7bb10ea88422e5f9e1" }
34+
datafusion = { path = "../datafusion", version = "5.1.0" }
35+
proc-macro2 = { version = "=1.0.28" }
3536

3637
[lib]
3738
name = "datafusion"

python/src/dataframe.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,13 @@ impl DataFrame {
161161
Ok(pretty::print_batches(&batches).unwrap())
162162
}
163163

164-
165164
/// Returns the join of two DataFrames `on`.
166-
fn join(&self, right: &DataFrame, on: Vec<&str>, how: &str) -> PyResult<Self> {
165+
fn join(
166+
&self,
167+
right: &DataFrame,
168+
join_keys: (Vec<&str>, Vec<&str>),
169+
how: &str,
170+
) -> PyResult<Self> {
167171
let builder = LogicalPlanBuilder::from(self.plan.clone());
168172

169173
let join_type = match how {
@@ -182,7 +186,7 @@ impl DataFrame {
182186
}
183187
};
184188

185-
let builder = errors::wrap(builder.join(&right.plan, join_type, on.clone(), on))?;
189+
let builder = errors::wrap(builder.join(&right.plan, join_type, join_keys))?;
186190

187191
let plan = errors::wrap(builder.build())?;
188192

python/tests/test_df.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_join():
104104
)
105105
df1 = ctx.create_dataframe([[batch]])
106106

107-
df = df.join(df1, on="a", how="inner")
107+
df = df.join(df1, on=("a", "a"), how="inner")
108108
df = df.sort([f.col("a").sort(ascending=True)])
109109
table = pa.Table.from_batches(df.collect())
110110

0 commit comments

Comments
 (0)