Skip to content

DataFrame with Nothing? column is detected as FormattedFrame<*>? in notebooks #1546

@Jolanrensen

Description

@Jolanrensen

As reported here: https://kotlinlang.slack.com/archives/C05333T208Y/p1762352545398199

This is the direct result of hasFormattedColumns():

internal fun AnyFrame.hasFormattedColumns() =
    this.getColumns { colsAtAnyDepth().colsOf<FormattedFrame<*>?>() }.isNotEmpty()

As colsOf<T>() includes all subtypes of T, colsOf<FormattedFrame<*>>()? will include null filled columns, of type Nothing?. This behavior is correct, though in hasFormattedColumns() this causes a problem, as it will return true if the dataframe has a Nothing? column.

Let's check the library for other colsOf<.*?>() usages to prevent similar issues.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions