Skip to content

Commit 5ec6fd2

Browse files
deprecate tail
1 parent 5ce2a7d commit 5ec6fd2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
import org.jetbrains.kotlinx.dataframe.DataFrame
4+
import org.jetbrains.kotlinx.dataframe.util.TAIL
5+
import org.jetbrains.kotlinx.dataframe.util.TAIL_REPLACE
46

57
// region DataFrame
68

9+
@Deprecated(TAIL, ReplaceWith(TAIL_REPLACE), DeprecationLevel.ERROR)
710
public fun <T> DataFrame<T>.tail(numRows: Int = 5): DataFrame<T> = takeLast(numRows)
811

912
// endregion

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ internal const val COL_TYPE_INSTANT =
137137
"kotlinx.datetime.Instant is deprecated in favor of kotlin.time.Instant. Either migrate to kotlin.time.Instant and use ColType.StdlibInstant or use ColType.DeprecatedInstant. $MESSAGE_1_0 and migrated to kotlin.time.Instant in 1.1."
138138
internal const val COL_TYPE_INSTANT_REPLACE = "ColType.DeprecatedInstant"
139139

140+
internal const val TAIL = "This function will be removed in favor of `takeLast()`. $MESSAGE_1_0"
141+
internal const val TAIL_REPLACE = "this.takeLast(numRows)"
142+
140143
// endregion
141144

142145
// region WARNING in 1.0, ERROR in 1.1

0 commit comments

Comments
 (0)