-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small convertTo fix #800
Small convertTo fix #800
Conversation
…enabled. Updated contribution guide too. TC will have to be updated manually
…-nullable column with nulls in it. This is now avoided and the behavior has been simplified/stabilized
# Conflicts: # core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/columns/DataColumnImpl.kt
…ary non-nullable column with nulls in it. This is now avoided and the behavior has been simplified/stabilized
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/convertTo.kt
Show resolved
Hide resolved
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/schema/Utils.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could understand very high-level what happens in changes, but it could be difficult in the future!
|
Interestingly, adding kotlinLogging breaks the compiler plugin in the black box tests wherever it is used with: @koperagen can we add this dependency to the plugin too? |
Generated sources will be updated after merging this PR. |
With the debug mode enabled, one failing test of #713 was in
convertTo
.It likely didn't cause any user issues, but it could prevent #712, so best to solve it.
It was a relatively small fix. I renamed
createEmptyColumn
tocreateNullFilledColumn
as that better reflects is behavior. Then, instead of creating the erroneous column, it throws an exception. This eliminates the need for the large boolean check in theconvertToImpl
function. Finally, sinceupdate
cannot target non-existing columns, I needed to update thefill
option ofconvertTo
, toupdate
oradd
columns depending on whether they were there already or not.