Skip to content

Commit 92fabdd

Browse files
deprecation fixes
1 parent a1b99f3 commit 92fabdd

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/constructors.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class ConstructorsTests {
8787
col.type() shouldBe typeOf<AnyRow>()
8888
col.kind() shouldBe ColumnKind.Group
8989
col[0] shouldBe row
90+
@Suppress("DEPRECATION_ERROR")
9091
col[1].isEmpty() shouldBe true
9192
}
9293

@@ -103,7 +104,9 @@ class ConstructorsTests {
103104
col.type() shouldBe typeOf<AnyRow>()
104105
col.kind() shouldBe ColumnKind.Group
105106
col[0] shouldBe row
107+
@Suppress("DEPRECATION_ERROR")
106108
col[1]!!.isEmpty() shouldBe true
109+
@Suppress("DEPRECATION_ERROR")
107110
col[2]!!.isEmpty() shouldBe true
108111
}
109112

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/statistics/sum.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class SumTests {
117117
}
118118
}
119119

120+
@Suppress("DEPRECATION_ERROR")
120121
@Test
121122
fun `unknown number type`() {
122123
columnOf(1.toBigDecimal(), 2.toBigDecimal()).toDataFrame()

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/DataFrameTests.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,6 +2464,7 @@ class DataFrameTests : BaseTest() {
24642464
df.comparableNothing.valuesAreComparable() shouldBe false
24652465
}
24662466

2467+
@Suppress("DEPRECATION_ERROR")
24672468
// https://github.com/Kotlin/dataframe/pull/1077#discussion_r1981352374
24682469
@Test
24692470
fun `values are comparable difficult`() {

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/DataFrameTreeTests.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class DataFrameTreeTests : BaseTest() {
266266

267267
@Test
268268
fun `move`() {
269-
val actual = typed2.move { nameAndCity.name }.into("name")
269+
val actual = typed2.move { nameAndCity.name }.into { pathOf("name") }
270270
actual.columnNames() shouldBe listOf("nameAndCity", "name", "age", "weight")
271271
actual.getColumnGroup("nameAndCity").columnNames() shouldBe listOf("city")
272272
}
@@ -368,6 +368,7 @@ class DataFrameTreeTests : BaseTest() {
368368
df2.pivot { it["nameAndCity"]["city"] }.groupBy { it["nameAndCity"]["name"] }.values("age").check()
369369
}
370370

371+
@Suppress("DEPRECATION_ERROR")
371372
@Test
372373
fun `pivot grouped column`() {
373374
val grouped = typed.group { age and weight }.into("info")

dataframe-arrow/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/ArrowKtTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import org.jetbrains.kotlinx.dataframe.api.NullabilityOptions
3535
import org.jetbrains.kotlinx.dataframe.api.add
3636
import org.jetbrains.kotlinx.dataframe.api.columnOf
3737
import org.jetbrains.kotlinx.dataframe.api.convertToBoolean
38-
import org.jetbrains.kotlinx.dataframe.api.copy
3938
import org.jetbrains.kotlinx.dataframe.api.dataFrameOf
4039
import org.jetbrains.kotlinx.dataframe.api.map
4140
import org.jetbrains.kotlinx.dataframe.api.pathOf

plugins/kotlin-dataframe/src/org/jetbrains/kotlinx/dataframe/plugin/impl/api/move.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import org.jetbrains.kotlinx.dataframe.api.after
44
import org.jetbrains.kotlinx.dataframe.api.into
55
import org.jetbrains.kotlinx.dataframe.api.move
66
import org.jetbrains.kotlinx.dataframe.api.moveToStart
7+
import org.jetbrains.kotlinx.dataframe.api.pathOf
78
import org.jetbrains.kotlinx.dataframe.api.to
89
import org.jetbrains.kotlinx.dataframe.api.toStart
910
import org.jetbrains.kotlinx.dataframe.api.toEnd
@@ -62,7 +63,7 @@ class MoveInto0 : AbstractSchemaModificationInterpreter() {
6263

6364
override fun Arguments.interpret(): PluginDataFrameSchema {
6465
val columns = receiver.columns.resolve(receiver.df).map { it.path }
65-
return receiver.df.asDataFrame().move { columns.toColumnSet() }.into(column).toPluginDataFrameSchema()
66+
return receiver.df.asDataFrame().move { columns.toColumnSet() }.into{ pathOf(column) }.toPluginDataFrameSchema()
6667
}
6768
}
6869

0 commit comments

Comments
 (0)