Skip to content

Commit 3e531c2

Browse files
committed
fixup! introducing parsing of Char? columns. It works the same as String parsing, failing when the returned type is Char or String
1 parent ff1f428 commit 3e531c2

File tree

1 file changed

+4
-0
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,10 @@ internal fun <T> DataFrame<T>.parseImpl(options: ParserOptions?, columns: Column
730730
.asColumnGroup(col.name())
731731
.asDataColumn()
732732

733+
// Base case, parse the column if it's a `Char?` column
734+
col.isSubtypeOf<Char?>() ->
735+
col.map { it?.toString() }.tryParseImpl(options)
736+
733737
// Base case, parse the column if it's a `String?` column
734738
col.isSubtypeOf<String?>() ->
735739
col.cast<String?>().tryParseImpl(options)

0 commit comments

Comments
 (0)