Skip to content

Commit 4f9f190

Browse files
committed
Rename from keep_duplicate_keys to drop_duplicate_keys
1 parent 9882dd9 commit 4f9f190

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

python/datafusion/dataframe.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def join(
774774
left_on: None = None,
775775
right_on: None = None,
776776
join_keys: None = None,
777-
keep_duplicate_keys: bool = False,
777+
drop_duplicate_keys: bool = True,
778778
) -> DataFrame: ...
779779

780780
@overload
@@ -787,7 +787,7 @@ def join(
787787
left_on: str | Sequence[str],
788788
right_on: str | Sequence[str],
789789
join_keys: tuple[list[str], list[str]] | None = None,
790-
keep_duplicate_keys: bool = False,
790+
drop_duplicate_keys: bool = True,
791791
) -> DataFrame: ...
792792

793793
@overload
@@ -800,7 +800,7 @@ def join(
800800
join_keys: tuple[list[str], list[str]],
801801
left_on: None = None,
802802
right_on: None = None,
803-
keep_duplicate_keys: bool = False,
803+
drop_duplicate_keys: bool = True,
804804
) -> DataFrame: ...
805805

806806
def join(
@@ -812,7 +812,7 @@ def join(
812812
left_on: str | Sequence[str] | None = None,
813813
right_on: str | Sequence[str] | None = None,
814814
join_keys: tuple[list[str], list[str]] | None = None,
815-
keep_duplicate_keys: bool = False,
815+
drop_duplicate_keys: bool = True,
816816
) -> DataFrame:
817817
"""Join this :py:class:`DataFrame` with another :py:class:`DataFrame`.
818818
@@ -825,7 +825,7 @@ def join(
825825
"right", "full", "semi", "anti".
826826
left_on: Join column of the left dataframe.
827827
right_on: Join column of the right dataframe.
828-
keep_duplicate_keys: When False, the columns from the right DataFrame
828+
drop_duplicate_keys: When True, the columns from the right DataFrame
829829
that have identical names in the ``on`` fields to the left DataFrame
830830
will be dropped.
831831
join_keys: Tuple of two lists of column names to join on. [Deprecated]
@@ -875,7 +875,7 @@ def join(
875875
right_on = [right_on]
876876

877877
return DataFrame(
878-
self.df.join(right.df, how, left_on, right_on, keep_duplicate_keys)
878+
self.df.join(right.df, how, left_on, right_on, drop_duplicate_keys)
879879
)
880880

881881
def join_on(

src/dataframe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ impl PyDataFrame {
629629
how: &str,
630630
left_on: Vec<PyBackedStr>,
631631
right_on: Vec<PyBackedStr>,
632-
keep_duplicate_keys: bool,
632+
drop_duplicate_keys: bool,
633633
) -> PyDataFusionResult<Self> {
634634
let join_type = match how {
635635
"inner" => JoinType::Inner,
@@ -656,7 +656,7 @@ impl PyDataFrame {
656656
None,
657657
)?;
658658

659-
if !keep_duplicate_keys {
659+
if drop_duplicate_keys {
660660
let mutual_keys = left_keys
661661
.iter()
662662
.zip(right_keys.iter())

0 commit comments

Comments
 (0)