Skip to content

Commit bd3936e

Browse files
Automated commit of generated code
1 parent c17509c commit bd3936e

File tree

12 files changed

+36
-31
lines changed

12 files changed

+36
-31
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public fun <T, C, R> MergeWithTransform<T, C, R>.into(path: ColumnPath): DataFra
117117
res = res
118118
.removeImpl(allowMissingColumns = true) { path }
119119
.df
120-
.move(mergePath).into { path }
120+
.move { mergePath }.into { path }
121121
}
122122
return res
123123
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import kotlin.reflect.typeOf
1515

1616
public fun <T> DataRow<T>.transpose(): DataFrame<NameValuePair<*>> {
1717
val valueColumn = DataColumn.createByInference(NameValuePair<*>::value.columnName, values)
18-
val nameColumn = owner.columnNames().toValueColumn(NameValuePair<*>::name)
18+
val nameColumn = owner.columnNames().toValueColumn(NameValuePair<*>::name.name)
1919
return dataFrameOf(nameColumn, valueColumn).cast()
2020
}
2121

@@ -25,7 +25,7 @@ public inline fun <reified T> AnyRow.transposeTo(): DataFrame<NameValuePair<T>>
2525
internal fun <T> AnyRow.transposeTo(type: KType): DataFrame<NameValuePair<T>> {
2626
val convertedValues = values.map { it?.convertTo(type) as T? }
2727
val valueColumn = DataColumn.createByInference(NameValuePair<T>::value.columnName, convertedValues)
28-
val nameColumn = owner.columnNames().toValueColumn(NameValuePair<T>::name)
28+
val nameColumn = owner.columnNames().toValueColumn(NameValuePair<T>::name.name)
2929
return dataFrameOf(nameColumn, valueColumn).cast()
3030
}
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public fun <T> DataFrame<T>.valueCounts(
7272
.asColumnGroup(rows)
7373
.asDataColumn()
7474
.valueCounts(sort, ascending, dropNA, countName)
75-
.ungroup(rows)
75+
.ungroup { rows }
7676
.cast()
7777
}
7878

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ internal fun <T, C> DataFrame<T>.flattenImpl(
3232
fun getRootPrefix(path: ColumnPath) =
3333
(1 until path.size).asSequence().map { path.take(it) }.first { rootPrefixes.contains(it) }
3434

35-
val result = move { rootPrefixes.toColumnSet().colsAtAnyDepth { !it.isColumnGroup() } }
35+
val result = move { rootPrefixes.toColumnSet().colsAtAnyDepth().filter { !it.isColumnGroup() } }
3636
.into {
3737
val targetPath = getRootPrefix(it.path).dropLast(1)
3838
val nameGen = nameGenerators[targetPath]!!

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ internal fun <T, C, K, R> Gather<T, C, K, R>.gatherImpl(
6262

6363
// explode keys and values
6464
df = when {
65-
keysColumn != null && valuesColumn != null -> df.explode(keysColumn, valuesColumn)
66-
else -> df.explode(keysColumn ?: valuesColumn!!)
65+
keysColumn != null && valuesColumn != null -> df.explode { keysColumn and valuesColumn }
66+
else -> df.explode { keysColumn ?: valuesColumn!! }
6767
}
6868

6969
// explode values in lists
7070
if (explode && valuesColumn != null) {
71-
df = df.explode(valuesColumn)
71+
df = df.explode { valuesColumn }
7272
}
7373
} else {
7474
val nameAndValue = column<List<Pair<K, Any?>>>("nameAndValue")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ internal object Parsers : GlobalParserOptions {
348348
private val readJsonStrAnyFrame: ((text: String) -> AnyFrame)? by lazy {
349349
try {
350350
val klass = Class.forName("org.jetbrains.kotlinx.dataframe.io.JsonKt")
351-
val typeClashTactic = Class.forName("org.jetbrains.kotlinx.dataframe.io.JSON\$TypeClashTactic")
351+
val typeClashTactic = Class.forName($$"org.jetbrains.kotlinx.dataframe.io.JSON$TypeClashTactic")
352352
val readJsonStr = klass.getMethod(
353353
"readJsonStr",
354354
// this =

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ internal fun <T, C, V : Comparable<V>> Reorder<T, C>.reorderImpl(
7171
df = if (parentPath.isEmpty()) {
7272
newGroup.cast()
7373
} else {
74-
df.replace(parentPath).with { newGroup.asColumnGroup(it.name()) }
74+
df.replace { parentPath }.with { newGroup.asColumnGroup(it.name()) }
7575
}
7676
}
7777
return df

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/parse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ class ParseTests {
255255
testSuccess(90_500.milliseconds, "PT1M30.500S")
256256

257257
// with sign
258-
testSuccess(-1.days + 15.minutes, "-PT23H45M", "PT-23H-45M", "+PT-24H+15M")
259-
testSuccess(-1.days - 15.minutes, "-PT24H15M", "PT-24H-15M", "-PT25H-45M")
258+
testSuccess((-1).days + 15.minutes, "-PT23H45M", "PT-23H-45M", "+PT-24H+15M")
259+
testSuccess((-1).days - 15.minutes, "-PT24H15M", "PT-24H-15M", "-PT25H-45M")
260260
testSuccess(Duration.ZERO, "PT0S", "P1DT-24H", "+PT-1H+60M", "-PT1M-60S")
261261

262262
// infinite

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/sortGroupedDataframe.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SortGroupedDataframeTests {
5757
groupBy.keys[0].print()
5858

5959
val df1 = groupBy.updateGroups {
60-
val missingValues = State.values().asList().toDataFrame {
60+
val missingValues = State.entries.toDataFrame {
6161
"state" from { it }
6262
}
6363

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/Analyze.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ class Analyze : TestBase() {
447447

448448
@Test
449449
@TransformDataFrameExpressions
450-
fun columnsFor_aсcessors() {
450+
fun columnsFor_accessors() {
451451
// SampleStart
452452
val name by columnGroup()
453453
val firstName by name.column<String>()

0 commit comments

Comments
 (0)