Open Jolanrensen opened 4 weeks ago
7/15 tests are fixed by https://github.com/Kotlin/dataframe/issues/727
Next are the pivot tests with 0
and true
in Boolean
columns.
I suspect this is due to default()
taking Any?
and the pivot implementation not re-inferring the types of the columns after filling in a null
with the given default in: df.pivot { city }.groupBy { name }.default(0).min()
.
After merging https://github.com/Kotlin/dataframe/issues/713 there are just 5 failing tests left:
type: KType
inDataColumnImpl
mismatches actual values in some cases. This can result in runtime exceptions and makes life difficult attempting to fix https://github.com/Kotlin/dataframe/issues/30 or https://github.com/Kotlin/dataframe/issues/704 where we assume thetype
always correctly represents the data. This issue relates to https://github.com/Kotlin/dataframe/issues/701 as well.To discover these bugs, we can introduce a (debug-only!!) check in
DataColumnImpl
, like:At the moment of testing, I can find 8+ breaking tests in
:core
:org.jetbrains.kotlinx.dataframe.io.PlaylistJsonTest#aggregate by column
[DataFrameImpl]
,kType
is:org.jetbrains.kotlinx.dataframe.aggregation.AggregateGroupedDsl<org.jetbrains.kotlinx.dataframe.io.PlaylistJsonTest.DataFrameType1>
AggregateGroupedDsl
is aDataFrame
org.jetbrains.kotlinx.dataframe.samples.api.Analyze#pivotDefault_accessors
/#pivotDefault_strings
/#pivotDefault_properties
[Boolean, Int]
,kType
is:kotlin.Boolean
concatImpl
I thinkorg.jetbrains.kotlinx.dataframe.samples.api.Modify#customConverters
[Nothing?]
,kType
iskotlin.Int
convertToImpl$convertToSchema
org.jetbrains.kotlinx.dataframe.samples.api.Modify#implode
[DataFrameImpl, Nothing?]
,kType
is:org.jetbrains.kotlinx.dataframe.DataFrame<*>
, not nullableimplodeImpl
where anull
is put in aFrameColumn
org.jetbrains.kotlinx.dataframe.testSets.person.DataFrameTests#convertTo
[Nothing?]
,kType
is:kotlin.Int
convertToImpl$convertToSchema
tooorg.jetbrains.kotlinx.dataframe.testSets.person.DataFrameTreeTests#merge rows into table
[DataFrameImpl, Nothing?]
,kType
is:org.jetbrains.kotlinx.dataframe.DataFrame<*>
, not nullableimplodeImpl
too where anull
is put in aFrameColumn
Edit: running it afresh (clean pull of master with check) I get 15 failing tests.
There is also an exception in
:dataframe-jdbc
: https://github.com/Kotlin/dataframe/issues/701