Skip to content

Commit 3d489ae

Browse files
Automated commit of generated code
1 parent 5aced4a commit 3d489ae

File tree

1 file changed

+12
-7
lines changed
  • core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api

1 file changed

+12
-7
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import org.jetbrains.kotlinx.dataframe.api.isColumnGroup
2525
import org.jetbrains.kotlinx.dataframe.api.isFrameColumn
2626
import org.jetbrains.kotlinx.dataframe.api.isSubtypeOf
2727
import org.jetbrains.kotlinx.dataframe.api.map
28-
import org.jetbrains.kotlinx.dataframe.api.parse
2928
import org.jetbrains.kotlinx.dataframe.api.to
3029
import org.jetbrains.kotlinx.dataframe.columns.TypeSuggestion
3130
import org.jetbrains.kotlinx.dataframe.columns.size
@@ -536,23 +535,29 @@ internal fun <T> DataFrame<T>.parseImpl(options: ParserOptions?, columns: Column
536535
when {
537536
// when a frame column is requested to be parsed,
538537
// parse each value/frame column at any depth inside each DataFrame in the frame column
539-
col.isFrameColumn() -> col.map {
540-
it.parseImpl(options) {
541-
colsAtAnyDepth { !it.isColumnGroup() }
538+
col.isFrameColumn() -> {
539+
col.map {
540+
it.parseImpl(options) {
541+
colsAtAnyDepth { !it.isColumnGroup() }
542+
}
542543
}
543544
}
544545

545546
// when a column group is requested to be parsed,
546547
// parse each column in the group
547-
col.isColumnGroup() ->
548+
col.isColumnGroup() -> {
548549
col.parseImpl(options) { all() }
549550
.asColumnGroup(col.name())
550551
.asDataColumn()
552+
}
551553

552554
// Base case, parse the column if it's a `String?` column
553-
col.isSubtypeOf<String?>() ->
555+
col.isSubtypeOf<String?>() -> {
554556
col.cast<String?>().tryParseImpl(options)
557+
}
555558

556-
else -> col
559+
else -> {
560+
col
561+
}
557562
}
558563
}

0 commit comments

Comments
 (0)