Skip to content

Commit b67c928

Browse files
Automated commit of generated code
1 parent 34bc798 commit b67c928

File tree

3 files changed

+10
-27
lines changed

3 files changed

+10
-27
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/GroupByImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import org.jetbrains.kotlinx.dataframe.api.getColumn
1515
import org.jetbrains.kotlinx.dataframe.api.getColumnsWithPaths
1616
import org.jetbrains.kotlinx.dataframe.api.into
1717
import org.jetbrains.kotlinx.dataframe.api.isColumnGroup
18-
import org.jetbrains.kotlinx.dataframe.api.minus
1918
import org.jetbrains.kotlinx.dataframe.api.pathOf
19+
import org.jetbrains.kotlinx.dataframe.api.remove
2020
import org.jetbrains.kotlinx.dataframe.api.rename
2121
import org.jetbrains.kotlinx.dataframe.columns.FrameColumn
2222
import org.jetbrains.kotlinx.dataframe.impl.aggregation.AggregatableInternal
@@ -41,7 +41,7 @@ internal class GroupByImpl<T, G>(
4141
) : GroupBy<T, G>,
4242
AggregatableInternal<G> {
4343

44-
override val keys by lazy { df - groups }
44+
override val keys by lazy { df.remove(groups) }
4545

4646
override fun <R> updateGroups(transform: Selector<DataFrame<G>, DataFrame<R>>) =
4747
df.convert(groups) { transform(it, it) }.asGroupBy(groups.name()) as GroupBy<T, R>

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

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ import org.jetbrains.kotlinx.dataframe.api.rename
121121
import org.jetbrains.kotlinx.dataframe.api.reorderColumnsByName
122122
import org.jetbrains.kotlinx.dataframe.api.replace
123123
import org.jetbrains.kotlinx.dataframe.api.rows
124-
import org.jetbrains.kotlinx.dataframe.api.schema
125124
import org.jetbrains.kotlinx.dataframe.api.select
126125
import org.jetbrains.kotlinx.dataframe.api.single
127126
import org.jetbrains.kotlinx.dataframe.api.sortBy
@@ -189,7 +188,6 @@ import org.jetbrains.kotlinx.dataframe.size
189188
import org.jetbrains.kotlinx.dataframe.type
190189
import org.jetbrains.kotlinx.dataframe.typeClass
191190
import org.junit.Test
192-
import java.lang.reflect.Type
193191
import java.math.BigDecimal
194192
import java.time.LocalDate
195193
import kotlin.reflect.jvm.jvmErasure
@@ -956,16 +954,9 @@ class DataFrameTests : BaseTest() {
956954

957955
fun check(body: () -> AnyFrame) = body().columnNames() shouldBe expected
958956

959-
check { typed - { age } }
960-
check { typed - { it.age } }
961957
check { typed.remove { age } }
962958
check { typed.remove { it.age } }
963-
964-
check { df - { age } }
965-
check { df - age }
966959
check { df.remove(age) }
967-
968-
check { df - "age" }
969960
check { df.remove("age") }
970961
}
971962

@@ -975,20 +966,14 @@ class DataFrameTests : BaseTest() {
975966

976967
fun check(body: () -> AnyFrame) = body().columnNames() shouldBe expected
977968

978-
check { typed - { age and weight } }
979-
check { typed - { it.age and it.weight } }
980-
check { typed - { age } - { weight } }
981-
check { typed - { it.age } - { it.weight } }
969+
check { typed.remove { age }.remove { weight } }
970+
check { typed.remove { it.age }.remove { it.weight } }
982971
check { typed.remove { age and weight } }
983972
check { typed.remove { it.age and it.weight } }
984-
985-
check { df - { age and weight } }
986-
check { df - age - weight }
987-
check { df - { age } - { weight } }
988973
check { df.remove(age, weight) }
989974

990-
check { df - { "age" and "weight" } }
991-
check { df - "age" - "weight" }
975+
check { df.remove { "age" and "weight" } }
976+
check { df.remove { "age"() }.remove { "weight"() } }
992977
check { df.remove("age", "weight") }
993978
}
994979

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ import org.jetbrains.kotlinx.dataframe.api.map
7070
import org.jetbrains.kotlinx.dataframe.api.max
7171
import org.jetbrains.kotlinx.dataframe.api.maxBy
7272
import org.jetbrains.kotlinx.dataframe.api.median
73-
import org.jetbrains.kotlinx.dataframe.api.minus
7473
import org.jetbrains.kotlinx.dataframe.api.move
7574
import org.jetbrains.kotlinx.dataframe.api.moveTo
7675
import org.jetbrains.kotlinx.dataframe.api.moveToLeft
@@ -87,7 +86,6 @@ import org.jetbrains.kotlinx.dataframe.api.sortBy
8786
import org.jetbrains.kotlinx.dataframe.api.split
8887
import org.jetbrains.kotlinx.dataframe.api.sumOf
8988
import org.jetbrains.kotlinx.dataframe.api.toColumnAccessor
90-
import org.jetbrains.kotlinx.dataframe.api.toDataFrame
9189
import org.jetbrains.kotlinx.dataframe.api.toTop
9290
import org.jetbrains.kotlinx.dataframe.api.under
9391
import org.jetbrains.kotlinx.dataframe.api.ungroup
@@ -587,13 +585,13 @@ class DataFrameTreeTests : BaseTest() {
587585

588586
@Test
589587
fun `join with left path`() {
590-
val joined = (typed2 - { weight }).join(typed - { city }) { nameAndCity.name.match(right.name) and age }
588+
val joined = typed2.remove { weight }.join(typed.remove { city }) { nameAndCity.name.match(right.name) and age }
591589
joined shouldBe typed2
592590
}
593591

594592
@Test
595593
fun `join with right path`() {
596-
val joined = (typed - { city }).join(typed2 - { weight }) { name.match(right.nameAndCity.name) and age }
594+
val joined = typed.remove { city }.join(typed2.remove { weight }) { name.match(right.nameAndCity.name) and age }
597595
val expected = typed.moveToRight { city }.move { city }.under("nameAndCity")
598596
joined shouldBe expected
599597
}
@@ -605,8 +603,8 @@ class DataFrameTreeTests : BaseTest() {
605603
val grouped = typed.group { name and age }.into(nameAndAge).add(cityFirst) { city?.get(0) }
606604
grouped[nameAndAge].columnsCount() shouldBe 3
607605

608-
val left = grouped - { weight }
609-
val right = grouped - { city }
606+
val left = grouped.remove { weight }
607+
val right = grouped.remove { city }
610608
val joined = left.join(right) { nameAndAge }
611609
joined shouldBe grouped
612610
}

0 commit comments

Comments
 (0)