Skip to content

Commit

Permalink
reformat SimpleCol.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
koperagen committed Feb 3, 2025
1 parent 73b4e80 commit dc858cd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:Suppress("INVISIBLE_REFERENCE", "CANNOT_OVERRIDE_INVISIBLE_MEMBER")

package org.jetbrains.kotlinx.dataframe.plugin.impl

import org.jetbrains.kotlin.fir.analysis.checkers.fullyExpandedClassId
Expand All @@ -19,6 +17,7 @@ data class PluginDataFrameSchema(
companion object {
val EMPTY = PluginDataFrameSchema(emptyList())
}

fun columns(): List<SimpleCol> {
return columns
}
Expand All @@ -39,9 +38,11 @@ private fun List<SimpleCol>.asString(indent: String = ""): String {
is SimpleFrameColumn -> {
"${it.name}: *\n" + it.columns().asString("$indent ")
}

is SimpleColumnGroup -> {
"${it.name}:\n" + it.columns().asString("$indent ")
}

is SimpleDataColumn -> {
"${it.name}: ${it.type.type.renderReadable()}"
}
Expand Down Expand Up @@ -129,6 +130,7 @@ private fun KotlinTypeFacade.makeNullable(column: SimpleCol): SimpleCol {
is SimpleColumnGroup -> {
SimpleColumnGroup(column.name, column.columns().map { makeNullable(it) })
}

is SimpleFrameColumn -> column
is SimpleDataColumn -> SimpleDataColumn(column.name, column.type.changeNullability { true })
}
Expand Down

0 comments on commit dc858cd

Please sign in to comment.