Skip to content

Commit 65d5991

Browse files
committed
Annotate into { } overloads for limited constant String return value support
1 parent 072b76f commit 65d5991

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ public class GroupClause<T, C>(internal val df: DataFrame<T>, internal val colum
171171
* where that column should be grouped.
172172
* All selected columns will be moved under the groups defined by this expression.
173173
*/
174+
@Refine
174175
@JvmName("intoString")
175176
@OverloadResolutionByLambdaReturnType
176177
@OptIn(ExperimentalTypeInference::class)
178+
@Interpretable("IntoStringLambda")
177179
public fun <T, C> GroupClause<T, C>.into(column: ColumnsSelectionDsl<T>.(ColumnWithPath<C>) -> String): DataFrame<T> =
178180
df.move(columns).under { column(it).toColumnAccessor() }
179181

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ public fun <T, C> RenameClause<T, C>.into(vararg newNames: KProperty<*>): DataFr
282282
* and returns the new column name.
283283
* @return A new [DataFrame] with the columns renamed.
284284
*/
285+
@Refine
286+
@Interpretable("RenameIntoLambda")
285287
public fun <T, C> RenameClause<T, C>.into(transform: (ColumnWithPath<C>) -> String): DataFrame<T> =
286288
renameImpl(transform)
287289

0 commit comments

Comments
 (0)