Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
822 stars 58 forks source link

make sure to adjust nullability in order to fix platform types #552

Closed koperagen closed 9 months ago

koperagen commented 9 months ago

Platform types can lead to unexpected NPE and the way types rendered now: "URI!" - ! sign appears. Code with such type cannot be compiled Given type URI!, type.withNullability will produce either URI or URI?. Both are OK for us.

Jolanrensen commented 9 months ago

Code with such type cannot be compiled Given type URI!, type.withNullability will produce either URI or URI?.

When will it produce either the nullable one or the non-nullable one?

koperagen commented 9 months ago

I just wanted to say that calling type.withNullability fixes platform type. It becomes something dataframe codegen can work with :) In our case this function is called when Infer.Nulls is used, in which case actual nullability depends on data.