Skip to content
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

Merged
merged 7 commits into from
Aug 1, 2024
Merged

Small convertTo fix #800

merged 7 commits into from
Aug 1, 2024

Conversation

Jolanrensen
Copy link
Collaborator

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 to createNullFilledColumn 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 the convertToImpl function. Finally, since update cannot target non-existing columns, I needed to update the fill option of convertTo, to update or add columns depending on whether they were there already or not.

…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
@Jolanrensen Jolanrensen marked this pull request as ready for review July 30, 2024 14:20
@Jolanrensen Jolanrensen requested a review from zaleslaw July 30, 2024 14:20
Copy link
Collaborator

@zaleslaw zaleslaw left a 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!

@Jolanrensen Jolanrensen requested a review from zaleslaw July 31, 2024 12:13
@Jolanrensen
Copy link
Collaborator Author

I could understand very high-level what happens in changes, but it could be difficult in the future!

convertToImpl (as well as many of the other internal implementations of functions in DF) are hard to follow indeed. I hope I now made it at least a bit less complicated :)

@Jolanrensen
Copy link
Collaborator Author

Jolanrensen commented Jul 31, 2024

Interestingly, adding kotlinLogging breaks the compiler plugin in the black box tests wherever it is used with:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

@koperagen can we add this dependency to the plugin too?
Edit: fixed by manually adding sl4j to the :core module, as suggested by kotlinLogging

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Generated sources will be updated after merging this PR.
Please inspect the changes in here.

@Jolanrensen Jolanrensen merged commit 6838ecf into master Aug 1, 2024
5 checks passed
@Jolanrensen Jolanrensen deleted the createEmptyColumn branch August 1, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants