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

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

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

koperagen
Copy link
Collaborator

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.

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
Copy link
Collaborator

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
Copy link
Collaborator Author

koperagen commented Jan 10, 2024

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.

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.

Cool, this PR gives me an ability to dig into Infering of nullability

@koperagen koperagen merged commit d08784e into master Jan 10, 2024
2 checks passed
@koperagen koperagen added the bug Something isn't working label Feb 21, 2024
@koperagen koperagen added this to the 0.13.0 milestone Feb 21, 2024
@koperagen koperagen self-assigned this Feb 21, 2024
@koperagen koperagen removed this from the 0.13.0 milestone Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants