jorisvandenbossche commented on a change in pull request #12452:
URL: https://github.com/apache/arrow/pull/12452#discussion_r837158265



##########
File path: python/pyarrow/table.pxi
##########
@@ -2475,6 +2475,49 @@ cdef class Table(_PandasConvertible):
 
         return table
 
+    def join(self, right_table, keys, right_keys=None, join_type="left outer",
+             left_suffix=None, right_suffix=None, use_threads=True):
+        """
+        Perform a join between this table and another one.
+
+        Result of the join will be a new Table, where further
+        operations can be applied.
+
+        Parameters
+        ----------
+        right_table : Table
+            The table to join to the current one, acting as the right table
+            in the join operation.
+        keys : str or list[str]
+            The columns from current table that should be used as keys
+            of the join operation left side.
+        right_keys : str or list[str], default None
+            The columns from the right_table that should be used as keys
+            on the join operation right side. 
+            When ``None`` use the same key names as the left table.
+        join_type : str, default "left outer"
+            The kind of join that should be performed, one of
+            ("left semi", "right semi", "left anti", "right anti",
+            "inner", "left outer", "right outer", "full outer")
+        left_suffix : str, default None
+            Which suffix to add to right column names. This prevents confusion
+            when the columns in left and right tables have colliding names.
+        right_suffix : str, default None
+            Which suffic to add to the left column names. This prevents 
confusion
+            when the columns in left and right tables have colliding names.
+        use_threads : bool, default True
+            Whenever to use multithreading or not.
+
+        Returns
+        -------
+        Table
+        """
+        if right_keys is None:
+            right_keys = keys
+        return _pc()._exec_plan.tables_join(join_type, self, keys, 
right_table, right_keys,
+                                            left_suffix=left_suffix, 
right_suffix=right_suffix,
+                                            use_threads=use_threads, 
deduplicate=True)

Review comment:
       `coalesce_keys` sounds good, thanks!




-- 
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]


Reply via email to