Skip to content

Commit 82b5fd6

Browse files
committed
Fix detection of object properties in read operation
1 parent 8c60ab6 commit 82b5fd6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/toDataFrame.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public inline fun <reified T> DataColumn<T>.read(): AnyCol = when (kind()) {
4141
isPrimitive() -> this
4242
typeClass == File::class -> cast<File?>().mapNotNullValues { DataFrame.read(it) }
4343
typeClass == URL::class -> cast<URL?>().mapNotNullValues { DataFrame.read(it) }
44-
else -> values().toDataFrame().asColumnGroup(name()).asDataColumn()
44+
else -> values().createDataFrameImpl(typeClass) {
45+
(this as CreateDataFrameDsl<T>).properties(depth = 1)
46+
}.asColumnGroup(name()).asDataColumn()
4547
}
4648
}
4749

0 commit comments

Comments
 (0)