Skip to content

Commit e070b97

Browse files
join kdocs fixes
1 parent 3e1351e commit e070b97

File tree

2 files changed

+76
-75
lines changed

2 files changed

+76
-75
lines changed

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

Lines changed: 42 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ import kotlin.reflect.KProperty
2727
* If no join columns are specified, all columns with matching names in both [DataFrame]s are used.
2828
*
2929
* If both [DataFrame]s contain columns with the same name that are *not* part of the join keys,
30-
* such columns are treated as distinct. Such a column from the right [DataFrame] will be automatically
31-
* renamed in the resulting [DataFrame].
30+
* such columns are treated as distinct. Such a column from the right [DataFrame] will be
31+
* [automatically renamed][org.jetbrains.kotlinx.dataframe.documentation.AutoRenaming]
32+
* in the resulting [DataFrame].
3233
*/
34+
@ExcludeFromSources
3335
private interface JoinBehavior
3436

3537
/**
36-
* Joins this [DataFrame] with [other][\other] [DataFrame] using selected key columns.
38+
* Joins this [DataFrame] with the [other][\other] [DataFrame] using the selected key columns.
3739
*
3840
* Creates a new [DataFrame] by combining [rows][org.jetbrains.kotlinx.dataframe.DataRow]
3941
* from two input dataframes according to one or more matching key columns.
@@ -55,10 +57,12 @@ private interface JoinBehavior
5557
*
5658
* ### This `join` overload
5759
*/
60+
@ExcludeFromSources
5861
private interface JoinDocs
5962

6063
// `join` method used in the example
61-
private interface JoinMethod
64+
@ExcludeFromSources
65+
private interface JOIN_METHOD
6266

6367
/**
6468
* [JoinDsl] defines the columns used for joining [DataFrame]s
@@ -86,11 +90,12 @@ private interface JoinMethod
8690
internal interface JoinDslDescription
8791

8892
/**
89-
* Select join columns (incl. with different names in this and [other][other] [DataFrame]s)
93+
* Select join columns (incl. with different names in `this` and [other][other] [DataFrame]s)
9094
* using [JoinDsl].
9195
*
9296
* @include [JoinDslDescription]
9397
*/
98+
@ExcludeFromSources
9499
private interface SelectingColumnsJoinDsl
95100

96101
/**
@@ -135,15 +140,15 @@ public fun <A, B> DataFrame<A>.join(
135140
): DataFrame<A> = join(other, type) { columns.toColumnSet() }
136141

137142
/**
138-
* Performs [inner join][JoinType.Inner] of this [DataFrame] with [other][\other] [DataFrame]
139-
* using selected key columns.
143+
* Performs a [inner join][JoinType.Inner] of this [DataFrame] with the [other][\other] [DataFrame]
144+
* using the selected key columns.
140145
* @include [JoinType.Inner]
141146
*
142147
* This is a shortcut for [join] with [JoinType.Inner].
143148
*
144149
* @include [JoinBehavior]
145150
*
146-
* See also general [join] as well as other shortcuts with each of join types:
151+
* See also general [join], as well as other shortcuts with each of join types:
147152
* [leftJoin], [rightJoin], [fullJoin], [filterJoin], [excludeJoin].
148153
*
149154
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
@@ -159,7 +164,7 @@ private interface InnerJoinDocs
159164

160165
/**
161166
* @include [InnerJoinDocs]
162-
* @include [SelectingColumnsJoinDsl] {@set [JoinMethod] innerJoin}
167+
* @include [SelectingColumnsJoinDsl] {@set [JOIN_METHOD] innerJoin}
163168
* @param other [DataFrame] to join with.
164169
* @param selector [JoinColumnsSelector] specifying join columns;
165170
* if `null`, same-name columns are used.
@@ -175,7 +180,7 @@ public fun <A, B> DataFrame<A>.innerJoin(
175180
/**
176181
* @include [InnerJoinDocs]
177182
* @include [SelectingColumns.ColumnNames]
178-
* @include [JoinStringApiExample] {@set [JoinMethod] innerJoin}
183+
* @include [JoinStringApiExample] {@set [JOIN_METHOD] innerJoin}
179184
* @param other [DataFrame] to join with.
180185
* @param columns [Column Names][String] specifying join columns.
181186
* @return joined [DataFrame].
@@ -184,15 +189,15 @@ public fun <A, B> DataFrame<A>.innerJoin(other: DataFrame<B>, vararg columns: St
184189
innerJoin(other) { columns.toColumnSet() }
185190

186191
/**
187-
* Performs [left join][JoinType.Left] of this [DataFrame] with [other][\other] [DataFrame]
188-
* using selected key columns.
192+
* Performs a [left join][JoinType.Left] of this [DataFrame] with the [other][\other] [DataFrame]
193+
* using the selected key columns.
189194
* @include [JoinType.Left]
190195
*
191196
* This is a shortcut for [join] with [JoinType.Left].
192197
*
193198
* @include [JoinBehavior]
194199
*
195-
* See also general [join] as well as other shortcuts with each of join types:
200+
* See also general [join], as well as other shortcuts with each of join types:
196201
* [innerJoin], [rightJoin], [fullJoin], [filterJoin], [excludeJoin].
197202
*
198203
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
@@ -208,7 +213,7 @@ private interface LeftJoinDocs
208213

209214
/**
210215
* @include [LeftJoinDocs]
211-
* @include [SelectingColumnsJoinDsl] {@set [JoinMethod] leftJoin}
216+
* @include [SelectingColumnsJoinDsl] {@set [JOIN_METHOD] leftJoin}
212217
* @param other [DataFrame] to join with.
213218
* @param selector [JoinColumnsSelector] specifying join columns;
214219
* if `null`, same-name columns are used.
@@ -224,7 +229,7 @@ public fun <A, B> DataFrame<A>.leftJoin(
224229
/**
225230
* @include [LeftJoinDocs]
226231
* @include [SelectingColumns.ColumnNames]
227-
* @include [JoinStringApiExample] {@set [JoinMethod] leftJoin}
232+
* @include [JoinStringApiExample] {@set [JOIN_METHOD] leftJoin}
228233
* @param other [DataFrame] to join with.
229234
* @param columns [Column Names][String] specifying join columns.
230235
* @return joined [DataFrame].
@@ -233,15 +238,15 @@ public fun <A, B> DataFrame<A>.leftJoin(other: DataFrame<B>, vararg columns: Str
233238
leftJoin(other) { columns.toColumnSet() }
234239

235240
/**
236-
* Performs [right join][JoinType.Right] of this [DataFrame] with [other][\other] [DataFrame]
241+
* Performs a [right join][JoinType.Right] of this [DataFrame] with [other][\other] [DataFrame]
237242
* using selected key columns.
238243
* @include [JoinType.Right]
239244
*
240245
* This is a shortcut for [join] with [JoinType.Right].
241246
*
242247
* @include [JoinBehavior]
243248
*
244-
* See also general [join] as well as other shortcuts with each of join types:
249+
* See also general [join], as well as other shortcuts with each of join types:
245250
* [innerJoin], [leftJoin], [fullJoin], [filterJoin], [excludeJoin].
246251
*
247252
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
@@ -257,7 +262,7 @@ private interface RightJoinDocs
257262

258263
/**
259264
* @include [RightJoinDocs]
260-
* @include [SelectingColumnsJoinDsl] {@set [JoinMethod] rightJoin}
265+
* @include [SelectingColumnsJoinDsl] {@set [JOIN_METHOD] rightJoin}
261266
* @param other [DataFrame] to join with.
262267
* @param selector [JoinColumnsSelector] specifying join columns;
263268
* if `null`, same-name columns are used.
@@ -273,7 +278,7 @@ public fun <A, B> DataFrame<A>.rightJoin(
273278
/**
274279
* @include [RightJoinDocs]
275280
* @include [SelectingColumns.ColumnNames]
276-
* @include [JoinStringApiExample] {@set [JoinMethod] rightJoin}
281+
* @include [JoinStringApiExample] {@set [JOIN_METHOD] rightJoin}
277282
* @param other [DataFrame] to join with.
278283
* @param columns [Column Names][String] specifying join columns.
279284
* @return joined [DataFrame].
@@ -282,15 +287,15 @@ public fun <A, B> DataFrame<A>.rightJoin(other: DataFrame<B>, vararg columns: St
282287
rightJoin(other) { columns.toColumnSet() }
283288

284289
/**
285-
* Performs [full join][JoinType.Full] of this [DataFrame] with [other][\other] [DataFrame]
290+
* Performs a [full join][JoinType.Full] of this [DataFrame] with [other][\other] [DataFrame]
286291
* using selected key columns.
287292
* @include [JoinType.Full]
288293
*
289294
* This is a shortcut for [join] with [JoinType.Full].
290295
*
291296
* @include [JoinBehavior]
292297
*
293-
* See also general [join] as well as other shortcuts with each of join types:
298+
* See also general [join], as well as other shortcuts with each of join types:
294299
* [innerJoin], [leftJoin], [rightJoin], [filterJoin], [excludeJoin].
295300
*
296301
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
@@ -306,7 +311,7 @@ private interface FullJoinDocs
306311

307312
/**
308313
* @include [FullJoinDocs]
309-
* @include [SelectingColumnsJoinDsl] {@set [JoinMethod] fullJoin}
314+
* @include [SelectingColumnsJoinDsl] {@set [JOIN_METHOD] fullJoin}
310315
* @param other [DataFrame] to join with.
311316
* @param selector [JoinColumnsSelector] specifying join columns;
312317
* if `null`, same-name columns are used.
@@ -322,7 +327,7 @@ public fun <A, B> DataFrame<A>.fullJoin(
322327
/**
323328
* @include [FullJoinDocs]
324329
* @include [SelectingColumns.ColumnNames]
325-
* @include [JoinStringApiExample] {@set [JoinMethod] fullJoin}
330+
* @include [JoinStringApiExample] {@set [JOIN_METHOD] fullJoin}
326331
* @param other [DataFrame] to join with.
327332
* @param columns [Column Names][String] specifying join columns.
328333
* @return joined [DataFrame].
@@ -331,15 +336,15 @@ public fun <A, B> DataFrame<A>.fullJoin(other: DataFrame<B>, vararg columns: Str
331336
fullJoin(other) { columns.toColumnSet() }
332337

333338
/**
334-
* Performs [filter join][JoinType.Filter] of this [DataFrame] with [other][\other] [DataFrame]
339+
* Performs a [filter join][JoinType.Filter] of this [DataFrame] with [other][\other] [DataFrame]
335340
* using selected key columns.
336341
* @include [JoinType.Filter]
337342
*
338343
* This is a shortcut for [join] with [JoinType.Filter].
339344
*
340345
* @include [JoinBehavior]
341346
*
342-
* See also general [join] as well as other shortcuts with each of join types:
347+
* See also general [join], as well as other shortcuts with each of join types:
343348
* [innerJoin], [leftJoin], [rightJoin], [fullJoin], [excludeJoin].
344349
*
345350
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
@@ -355,7 +360,7 @@ private interface FilterJoinDocs
355360

356361
/**
357362
* @include [FilterJoinDocs]
358-
* @include [SelectingColumnsJoinDsl] {@set [JoinMethod] filterJoin}
363+
* @include [SelectingColumnsJoinDsl] {@set [JOIN_METHOD] filterJoin}
359364
* @param other [DataFrame] to join with.
360365
* @param selector [JoinColumnsSelector] specifying join columns;
361366
* if `null`, same-name columns are used.
@@ -371,7 +376,7 @@ public fun <A, B> DataFrame<A>.filterJoin(
371376
/**
372377
* @include [FilterJoinDocs]
373378
* @include [SelectingColumns.ColumnNames]
374-
* @include [JoinStringApiExample] {@set [JoinMethod] filterJoin}
379+
* @include [JoinStringApiExample] {@set [JOIN_METHOD] filterJoin}
375380
* @param other [DataFrame] to join with.
376381
* @param columns [Column Names][String] specifying join columns.
377382
* @return joined [DataFrame].
@@ -380,15 +385,15 @@ public fun <A, B> DataFrame<A>.filterJoin(other: DataFrame<B>, vararg columns: S
380385
filterJoin(other) { columns.toColumnSet() }
381386

382387
/**
383-
* Performs [exclude join][JoinType.Exclude] of this [DataFrame] with [other][\other] [DataFrame]
388+
* Performs a [exclude join][JoinType.Exclude] of this [DataFrame] with [other][\other] [DataFrame]
384389
* using selected key columns.
385390
* @include [JoinType.Exclude]
386391
*
387392
* This is a shortcut for [join] with [JoinType.Exclude].
388393
*
389394
* @include [JoinBehavior]
390395
*
391-
* See also general [join] as well as other shortcuts with each of join types:
396+
* See also general [join], as well as other shortcuts with each of join types:
392397
* [innerJoin], [leftJoin], [rightJoin], [filterJoin], [fullJoin].
393398
*
394399
* @include [SelectingColumns.ColumnGroupsAndNestedColumnsMention]
@@ -404,7 +409,7 @@ private interface ExcludeJoinDocs
404409

405410
/**
406411
* @include [ExcludeJoinDocs]
407-
* @include [SelectingColumnsJoinDsl] {@set [JoinMethod] excludeJoin}
412+
* @include [SelectingColumnsJoinDsl] {@set [JOIN_METHOD] excludeJoin}
408413
* @param other [DataFrame] to join with.
409414
* @param selector [JoinColumnsSelector] specifying join columns;
410415
* if `null`, same-name columns are used.
@@ -420,7 +425,7 @@ public fun <A, B> DataFrame<A>.excludeJoin(
420425
/**
421426
* @include [ExcludeJoinDocs]
422427
* @include [SelectingColumns.ColumnNames]
423-
* @include [JoinStringApiExample] {@set [JoinMethod] excludeJoin}
428+
* @include [JoinStringApiExample] {@set [JOIN_METHOD] excludeJoin}
424429
* @param other [DataFrame] to join with.
425430
* @param columns [Column Names][String] specifying join columns.
426431
* @return joined [DataFrame].
@@ -471,25 +476,17 @@ public interface JoinDsl<out A, out B> : ColumnsSelectionDsl<A> {
471476
@ExcludeFromSources
472477
private interface MatchDocs
473478

474-
/**
475-
* @include [MatchDocs]
476-
*/
479+
/** @include [MatchDocs] */
477480
@Interpretable("Match0")
478481
public infix fun <C> ColumnReference<C>.match(other: ColumnReference<C>): ColumnMatch<C> = ColumnMatch(this, other)
479482

480-
/**
481-
* @include [MatchDocs]
482-
*/
483+
/** @include [MatchDocs] */
483484
public infix fun <C> String.match(other: ColumnReference<C>): ColumnMatch<C> = ColumnMatch(toColumnOf(), other)
484485

485-
/**
486-
* @include [MatchDocs]
487-
*/
486+
/** @include [MatchDocs] */
488487
public infix fun <C> ColumnReference<C>.match(other: String): ColumnMatch<C> = ColumnMatch(this, other.toColumnOf())
489488

490-
/**
491-
* @include [MatchDocs]
492-
*/
489+
/** @include [MatchDocs] */
493490
public infix fun String.match(other: String): ColumnMatch<Any?> =
494491
ColumnMatch(toColumnAccessor(), other.toColumnAccessor())
495492

@@ -543,7 +540,7 @@ public interface JoinDsl<out A, out B> : ColumnsSelectionDsl<A> {
543540
}
544541

545542
/**
546-
* A special [ColumnSet] that specifies [column match][JoinDsl.match] for [join] operation.
543+
* A special [ColumnSet] that specifies a [column match][JoinDsl.match] for the [join] operation.
547544
*/
548545
public interface ColumnMatch<C> : ColumnSet<C> {
549546
public val left: ColumnReference<C>
@@ -560,7 +557,7 @@ internal class ColumnMatchImpl<C>(override val left: ColumnReference<C>, overrid
560557
/**
561558
* Creates a [ColumnMatch].
562559
*
563-
* Not intended for public API consumption. Please, use [match][JoinDsl.match] instead.
560+
* Not intended for public API consumption. Please use [match][JoinDsl.match] instead.
564561
*/
565562
public fun <C> ColumnMatch(left: ColumnReference<C>, right: ColumnReference<C>): ColumnMatch<C> =
566563
ColumnMatchImpl(left, right)

0 commit comments

Comments
 (0)