Skip to content

Commit f6300c9

Browse files
committed
Small refactorings and added docs
1 parent 303c920 commit f6300c9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,17 @@ internal open class DataFrameReceiver<T>(
3636
private val unresolvedColumnsPolicy: UnresolvedColumnsPolicy
3737
) : DataFrameReceiverBase<T>(source.unbox()), SingleColumn<DataRow<T>> {
3838

39-
private fun <R> DataColumn<R>?.check(path: ColumnPath): DataColumn<R>? =
39+
private fun <R> DataColumn<R>?.check(path: ColumnPath): DataColumn<R> =
4040
when (this) {
4141
null -> when (unresolvedColumnsPolicy) {
42-
UnresolvedColumnsPolicy.Create, UnresolvedColumnsPolicy.Skip -> MissingColumnGroup<Any>(path, this@DataFrameReceiver).asDataColumn().cast()
42+
UnresolvedColumnsPolicy.Create, UnresolvedColumnsPolicy.Skip -> MissingColumnGroup<Any>(
43+
path,
44+
this@DataFrameReceiver
45+
).asDataColumn().cast()
46+
4347
UnresolvedColumnsPolicy.Fail -> error("Column $path not found")
4448
}
49+
4550
is MissingDataColumn -> this
4651
is ColumnGroup<*> -> ColumnGroupWithParent(null, this).asDataColumn().cast()
4752
else -> this

0 commit comments

Comments
 (0)