Skip to content

Commit 421bb98

Browse files
committed
add missed compiler annotations for update
1 parent d5dd6b9 commit 421bb98

File tree

1 file changed

+9
-0
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
266266
* - {@include [SeeAlsoUpdatePerCol]}
267267
* @param [expression] The {@include [ExpressionsGivenRowAndColumn.RowColumnExpressionLink]} to provide a new value for every selected cell giving its row and column.
268268
*/
269+
@Refine
269270
@Interpretable("UpdatePerRowCol")
270271
public inline fun <T, C> Update<T, C>.perRowCol(crossinline expression: RowColumnExpression<T, C, C>): DataFrame<T> =
271272
updateImpl { row, column, _ -> expression(row, column) }
@@ -356,6 +357,7 @@ private interface CommonUpdatePerColMapDoc
356357
* @param [values] The [Map]<[String], Value> to provide a new value for every selected cell.
357358
* For each selected column, there must be a value in the map with the same name.
358359
*/
360+
@Refine
359361
@Interpretable("UpdatePerColMap")
360362
public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
361363
updateWithValuePerColumnImpl {
@@ -374,6 +376,7 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
374376
*
375377
* @param [values] The [DataRow] to provide a new value for every selected cell.
376378
*/
379+
@Refine
377380
@Interpretable("UpdatePerColRow")
378381
public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(values.toMap() as Map<String, C>)
379382

@@ -384,6 +387,7 @@ public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(val
384387
*
385388
* @param [valueSelector] The {@include [ExpressionsGivenColumn.ColumnExpressionLink]} to provide a new value for every selected cell giving its column.
386389
*/
390+
@Refine
387391
@Interpretable("UpdatePerCol")
388392
public fun <T, C> Update<T, C>.perCol(valueSelector: ColumnExpression<C, C>): DataFrame<T> =
389393
updateWithValuePerColumnImpl(valueSelector)
@@ -424,6 +428,7 @@ public fun <T, C> Update<T, C?>.notNull(): Update<T, C> = where { it != null } a
424428
* {@comment No brackets around `expression` because this doc is copied to [Update.notNull]}
425429
* @param expression Optional {@include [ExpressionsGivenRow.RowExpressionLink]} to update the rows with.
426430
*/
431+
@Refine
427432
@Interpretable("UpdateNotNull")
428433
public fun <T, C> Update<T, C?>.notNull(expression: UpdateExpression<T, C, C>): DataFrame<T> =
429434
notNull().with(expression)
@@ -509,6 +514,8 @@ private interface CommonSpecificWithDoc {
509514
* {@set [CommonSpecificWithDoc.FIRST] `null`}
510515
* {@set [CommonSpecificWithDoc.SECOND] [withNull][withNull]`()}
511516
*/
517+
@Refine
518+
@Interpretable("UpdateWithNull")
512519
public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
513520

514521
/**
@@ -517,4 +524,6 @@ public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
517524
* {@set [CommonSpecificWithDoc.FIRST] `0`}
518525
* {@set [CommonSpecificWithDoc.SECOND] [withZero][withZero]`()}
519526
*/
527+
@Refine
528+
@Interpretable("UpdateWithZero")
520529
public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColumnImpl { 0 as C }

0 commit comments

Comments
 (0)