Skip to content

Commit 651cbae

Browse files
Automated commit of generated code
1 parent a9e70da commit 651cbae

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.jetbrains.kotlinx.dataframe.annotations
2+
3+
/**
4+
* Functions that can be replaced with other API, such as shortcuts without clean value,
5+
* or something not properly designed, and so will be considered to be removed from API.
6+
* If you see a function marked with it and think it should be kept, please let us know in the GitHub issue:
7+
* https://github.com/Kotlin/dataframe/issues/1028
8+
*/
9+
internal annotation class CandidateForRemoval

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/DataRowApi.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import org.jetbrains.kotlinx.dataframe.DataFrame
88
import org.jetbrains.kotlinx.dataframe.DataRow
99
import org.jetbrains.kotlinx.dataframe.RowExpression
1010
import org.jetbrains.kotlinx.dataframe.annotations.AccessApiOverload
11+
import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval
1112
import org.jetbrains.kotlinx.dataframe.annotations.DataSchema
1213
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
1314
import org.jetbrains.kotlinx.dataframe.impl.columnName
@@ -20,8 +21,10 @@ import kotlin.experimental.ExperimentalTypeInference
2021
import kotlin.reflect.KProperty
2122
import kotlin.reflect.KType
2223

24+
@CandidateForRemoval
2325
public fun AnyRow.isEmpty(): Boolean = owner.columns().all { it[index] == null }
2426

27+
@CandidateForRemoval
2528
public fun AnyRow.isNotEmpty(): Boolean = !isEmpty()
2629

2730
public inline fun <reified R> AnyRow.valuesOf(): List<R> = values().filterIsInstance<R>()
@@ -184,12 +187,16 @@ public fun AnyRow.columnNames(): List<String> = df().columnNames()
184187

185188
public fun AnyRow.columnTypes(): List<KType> = df().columnTypes()
186189

190+
@CandidateForRemoval
187191
public fun <T> DataRow<T>.getRow(index: Int): DataRow<T> = getRowOrNull(index)!!
188192

193+
@CandidateForRemoval
189194
public fun <T> DataRow<T>.getRows(indices: Iterable<Int>): DataFrame<T> = df().getRows(indices)
190195

196+
@CandidateForRemoval
191197
public fun <T> DataRow<T>.getRows(indices: IntRange): DataFrame<T> = df().getRows(indices)
192198

199+
@CandidateForRemoval
193200
public fun <T> DataRow<T>.getRowOrNull(index: Int): DataRow<T>? {
194201
val df = df()
195202
return if (index >= 0 && index < df.nrow) df[index] else null
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
import org.jetbrains.kotlinx.dataframe.DataFrame
4-
4+
import org.jetbrains.kotlinx.dataframe.annotations.CandidateForRemoval
55
// region DataFrame
66

7+
@CandidateForRemoval
78
public fun <T> DataFrame<T>.copy(): DataFrame<T> = columns().toDataFrame().cast()
89

910
// endregion

0 commit comments

Comments
 (0)