Skip to content

Commit fd87cdf

Browse files
fix join type enum kdocs
1 parent 04aeb78 commit fd87cdf

File tree

2 files changed

+66
-30
lines changed

2 files changed

+66
-30
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/join.kt

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public fun <A, B> DataFrame<A>.join(
143143
/**
144144
* Performs a [inner join][JoinType.Inner] of this [DataFrame] with the [other][\other] [DataFrame]
145145
* using the selected key columns.
146-
* @include [JoinType.Inner]
146+
* @include [InnerJoinTypeDocs]
147147
*
148148
* This is a shortcut for [join] with [JoinType.Inner].
149149
*
@@ -192,7 +192,7 @@ public fun <A, B> DataFrame<A>.innerJoin(other: DataFrame<B>, vararg columns: St
192192
/**
193193
* Performs a [left join][JoinType.Left] of this [DataFrame] with the [other][\other] [DataFrame]
194194
* using the selected key columns.
195-
* @include [JoinType.Left]
195+
* @include [LeftJoinTypeDocs]
196196
*
197197
* This is a shortcut for [join] with [JoinType.Left].
198198
*
@@ -241,7 +241,7 @@ public fun <A, B> DataFrame<A>.leftJoin(other: DataFrame<B>, vararg columns: Str
241241
/**
242242
* Performs a [right join][JoinType.Right] of this [DataFrame] with [other][\other] [DataFrame]
243243
* using selected key columns.
244-
* @include [JoinType.Right]
244+
* @include [RightJoinTypeDocs]
245245
*
246246
* This is a shortcut for [join] with [JoinType.Right].
247247
*
@@ -290,7 +290,7 @@ public fun <A, B> DataFrame<A>.rightJoin(other: DataFrame<B>, vararg columns: St
290290
/**
291291
* Performs a [full join][JoinType.Full] of this [DataFrame] with [other][\other] [DataFrame]
292292
* using selected key columns.
293-
* @include [JoinType.Full]
293+
* @include [FullJoinTypeDocs]
294294
*
295295
* This is a shortcut for [join] with [JoinType.Full].
296296
*
@@ -339,7 +339,7 @@ public fun <A, B> DataFrame<A>.fullJoin(other: DataFrame<B>, vararg columns: Str
339339
/**
340340
* Performs a [filter join][JoinType.Filter] of this [DataFrame] with [other][\other] [DataFrame]
341341
* using selected key columns.
342-
* @include [JoinType.Filter]
342+
* @include [FilterJoinTypeDocs]
343343
*
344344
* This is a shortcut for [join] with [JoinType.Filter].
345345
*
@@ -388,7 +388,7 @@ public fun <A, B> DataFrame<A>.filterJoin(other: DataFrame<B>, vararg columns: S
388388
/**
389389
* Performs a [exclude join][JoinType.Exclude] of this [DataFrame] with [other][\other] [DataFrame]
390390
* using selected key columns.
391-
* @include [JoinType.Exclude]
391+
* @include [ExcludeJoinTypeDocs]
392392
*
393393
* This is a shortcut for [join] with [JoinType.Exclude].
394394
*
@@ -574,6 +574,48 @@ public fun <C> ColumnMatch(left: ColumnReference<C>, right: ColumnReference<C>):
574574
*/
575575
public typealias JoinColumnsSelector<A, B> = JoinDsl<A, B>.(ColumnsContainer<A>) -> ColumnsResolver<*>
576576

577+
/**
578+
* Includes only matching rows from both [DataFrame]s;
579+
* rows are merged.
580+
*/
581+
@ExcludeFromSources
582+
internal interface InnerJoinTypeDocs
583+
584+
/**
585+
* Includes all rows from the left [DataFrame]; matching rows are merged,
586+
* unmatched right-side values are filled with `null`.
587+
*/
588+
@ExcludeFromSources
589+
internal interface LeftJoinTypeDocs
590+
591+
/**
592+
* Includes all rows from the right [DataFrame]; matching rows are merged,
593+
* unmatched left-side values are filled with `null`.
594+
*/
595+
@ExcludeFromSources
596+
internal interface RightJoinTypeDocs
597+
598+
/**
599+
* Includes only rows from the left [DataFrame] that have a match in the right one;
600+
* right-side columns are not merged.
601+
*/
602+
@ExcludeFromSources
603+
internal interface FilterJoinTypeDocs
604+
605+
/**
606+
* Includes all rows from both [DataFrame]s; matching rows are merged,
607+
* all mismatches are filled with `null`.
608+
*/
609+
@ExcludeFromSources
610+
internal interface FullJoinTypeDocs
611+
612+
/**
613+
* Includes only rows from the left [DataFrame] that do *not* have a match in the right one;
614+
* right-side columns are not merged.
615+
*/
616+
@ExcludeFromSources
617+
internal interface ExcludeJoinTypeDocs
618+
577619
/**
578620
* Represents the type of [join] operation.
579621
*
@@ -582,38 +624,32 @@ public typealias JoinColumnsSelector<A, B> = JoinDsl<A, B>.(ColumnsContainer<A>)
582624
public enum class JoinType {
583625

584626
/**
585-
* Includes all rows from the left [DataFrame]; matching rows are merged,
586-
* unmatched right-side values are filled with `null`.
627+
* @include [LeftJoinTypeDocs]
587628
*/
588629
Left,
589630

590631
/**
591-
* Includes all rows from the right [DataFrame]; matching rows are merged,
592-
* unmatched left-side values are filled with `null`.
632+
* @include [RightJoinTypeDocs]
593633
*/
594634
Right,
595635

596636
/**
597-
* Includes only matching rows from both [DataFrame]s;
598-
* rows are merged.
637+
* @include [InnerJoinTypeDocs]
599638
*/
600639
Inner,
601640

602641
/**
603-
* Includes only rows from the left [DataFrame] that have a match in the right one;
604-
* right-side columns are not merged.
642+
* @include [FilterJoinTypeDocs]
605643
*/
606644
Filter,
607645

608646
/**
609-
* Includes all rows from both [DataFrame]s; matching rows are merged,
610-
* all mismatches are filled with `null`.
647+
* @include [FullJoinTypeDocs]
611648
*/
612649
Full,
613650

614651
/**
615-
* Includes only rows from the left [DataFrame] that do *not* have a match in the right one;
616-
* right-side columns are not merged.
652+
* @include [ExcludeJoinTypeDocs]
617653
*/
618654
Exclude,
619655
}
@@ -627,14 +663,14 @@ public enum class JoinType {
627663
* The exact behavior depends on the specified [join type][\type]:
628664
*
629665
* **Merging joins:**
630-
* * [JoinType.Inner] (default) — {@include [JoinType.Inner]}
631-
* * [JoinType.Left] — {@include [JoinType.Left]}
632-
* * [JoinType.Right] — {@include [JoinType.Right]}
633-
* * [JoinType.Full] — {@include [JoinType.Full]}
666+
* * [JoinType.Inner] (default) — {@include [InnerJoinTypeDocs]}
667+
* * [JoinType.Left] — {@include [LeftJoinTypeDocs]}
668+
* * [JoinType.Right] — {@include [RightJoinTypeDocs]}
669+
* * [JoinType.Full] — {@include [FullJoinTypeDocs]}
634670
*
635671
* **Non-merging joins:**
636-
* * [JoinType.Filter] — {@include [JoinType.Filter]}
637-
* * [JoinType.Exclude] — {@include [JoinType.Exclude]}
672+
* * [JoinType.Filter] — {@include [FilterJoinTypeDocs]}
673+
* * [JoinType.Exclude] — {@include [ExcludeJoinTypeDocs]}
638674
*/
639675
@ExcludeFromSources
640676
internal interface JoinTypeDescription

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/joinWith.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public fun <A, B> DataFrame<A>.joinWith(
110110

111111
/**
112112
* Performs a [inner join][JoinType.Inner] of this [DataFrame] with the [right][\right] [DataFrame]
113-
* using the provided [\joinExpression]. {@include [JoinType.Inner]}
113+
* using the provided [\joinExpression]. {@include [InnerJoinTypeDocs]}
114114
*
115115
* This is a shortcut for [joinWith] with [JoinType.Inner].
116116
*
@@ -137,7 +137,7 @@ public fun <A, B> DataFrame<A>.innerJoinWith(right: DataFrame<B>, joinExpression
137137

138138
/**
139139
* Performs a [left join][JoinType.Left] of this [DataFrame] with the [right][\right] [DataFrame]
140-
* using the provided [\joinExpression]. {@include [JoinType.Left]}
140+
* using the provided [\joinExpression]. {@include [LeftJoinTypeDocs]}
141141
*
142142
* This is a shortcut for [joinWith] with [JoinType.Left].
143143
*
@@ -164,7 +164,7 @@ public fun <A, B> DataFrame<A>.leftJoinWith(right: DataFrame<B>, joinExpression:
164164

165165
/**
166166
* Performs a [right join][JoinType.Right] of this [DataFrame] with the [right][\right] [DataFrame]
167-
* using the provided [\joinExpression]. {@include [JoinType.Right]}
167+
* using the provided [\joinExpression]. {@include [RightJoinTypeDocs]}
168168
*
169169
* This is a shortcut for [joinWith] with [JoinType.Right].
170170
*
@@ -191,7 +191,7 @@ public fun <A, B> DataFrame<A>.rightJoinWith(right: DataFrame<B>, joinExpression
191191

192192
/**
193193
* Performs a [full join][JoinType.Full] of this [DataFrame] with the [right][\right] [DataFrame]
194-
* using the provided [\joinExpression]. {@include [JoinType.Full]}
194+
* using the provided [\joinExpression]. {@include [FullJoinTypeDocs]}
195195
*
196196
* This is a shortcut for [joinWith] with [JoinType.Full].
197197
*
@@ -218,7 +218,7 @@ public fun <A, B> DataFrame<A>.fullJoinWith(right: DataFrame<B>, joinExpression:
218218

219219
/**
220220
* Performs a [filter join][JoinType.Filter] of this [DataFrame] with the [right][\right] [DataFrame]
221-
* using the provided [\joinExpression]. {@include [JoinType.Filter]}
221+
* using the provided [\joinExpression]. {@include [FilterJoinTypeDocs]}
222222
*
223223
* This is a shortcut for [joinWith] with [JoinType.Filter].
224224
*
@@ -245,7 +245,7 @@ public fun <A, B> DataFrame<A>.filterJoinWith(right: DataFrame<B>, joinExpressio
245245

246246
/**
247247
* Performs a [exclude join][JoinType.Exclude] of this [DataFrame] with the [right][\right] [DataFrame]
248-
* using the provided [\joinExpression]. {@include [JoinType.Exclude]}
248+
* using the provided [\joinExpression]. {@include [ExcludeJoinTypeDocs]}
249249
*
250250
* This is a shortcut for [joinWith] with [JoinType.Exclude].
251251
*

0 commit comments

Comments
 (0)