From a06452224ee16c2c055574cd2c117343b55de47b Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Mon, 30 May 2022 12:27:01 +0200 Subject: [PATCH 1/3] Select columns from joint tables to fix the order --- python/pyarrow/table.pxi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/pyarrow/table.pxi b/python/pyarrow/table.pxi index d4025f734ca..398347e7e90 100644 --- a/python/pyarrow/table.pxi +++ b/python/pyarrow/table.pxi @@ -4670,7 +4670,8 @@ cdef class Table(_PandasConvertible): Left outer join: - >>> t1.join(t2, 'id') + >>> t = t1.join(t2, 'id') + >>> t.select(["id", "year", "n_legs", "animal"]) pyarrow.Table id: int64 year: int64 From 47965f71b6c45019fd54d8b09638e5e73f78a9f5 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Mon, 30 May 2022 13:02:38 +0200 Subject: [PATCH 2/3] Change all join examples --- python/pyarrow/table.pxi | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/python/pyarrow/table.pxi b/python/pyarrow/table.pxi index 398347e7e90..63c1afa17df 100644 --- a/python/pyarrow/table.pxi +++ b/python/pyarrow/table.pxi @@ -4685,7 +4685,8 @@ cdef class Table(_PandasConvertible): Full outer join: - >>> t1.join(t2, 'id', join_type="full outer") + >>> t = t1.join(t2, 'id', join_type="full outer") + >>> t.select(["id", "year", "n_legs", "animal"]) pyarrow.Table id: int64 year: int64 @@ -4699,21 +4700,23 @@ cdef class Table(_PandasConvertible): Right outer join: - >>> t1.join(t2, 'id', join_type="right outer") + >>> t = t1.join(t2, 'id', join_type="right outer") + >>> t.select(["id", "year", "n_legs", "animal"]) pyarrow.Table - year: int64 id: int64 + year: int64 n_legs: int64 animal: string ---- - year: [[2019],[null]] id: [[3],[4]] + year: [[2019],[null]] n_legs: [[5],[100]] animal: [["Brittle stars"],["Centipede"]] Right anti join - >>> t1.join(t2, 'id', join_type="right anti") + >>> t = t1.join(t2, 'id', join_type="right anti") + >>> t.select(["id", "n_legs", "animal"]) pyarrow.Table id: int64 n_legs: int64 From eaeaed8bfa00708d841e676ddda5aca606dcaae0 Mon Sep 17 00:00:00 2001 From: Alenka Frim Date: Tue, 31 May 2022 11:31:45 +0200 Subject: [PATCH 3/3] Change ordering for right outer join --- python/pyarrow/table.pxi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/pyarrow/table.pxi b/python/pyarrow/table.pxi index 63c1afa17df..45d0a6ad764 100644 --- a/python/pyarrow/table.pxi +++ b/python/pyarrow/table.pxi @@ -4701,15 +4701,15 @@ cdef class Table(_PandasConvertible): Right outer join: >>> t = t1.join(t2, 'id', join_type="right outer") - >>> t.select(["id", "year", "n_legs", "animal"]) + >>> t.select(["year", "id", "n_legs", "animal"]) pyarrow.Table - id: int64 year: int64 + id: int64 n_legs: int64 animal: string ---- - id: [[3],[4]] year: [[2019],[null]] + id: [[3],[4]] n_legs: [[5],[100]] animal: [["Brittle stars"],["Centipede"]]