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

Support for Roslyn nullable annotations #537

Merged
merged 5 commits into from
Sep 6, 2024

Conversation

ErikApption
Copy link
Contributor

This is a fix for bug #535. The current parquet.net doesn't leverage compiler nullable when checking if members are nullable. This affects all classes - so any string property was marked as nullable in the schema. This PR adds checks for Roslyn's annotations to ensure that a field is nullable.

  • Added checks for roslin compiler attributes to properly identify nullable and not nullable classes
  • Added supporting unit tests

@ErikApption ErikApption changed the title Added better support for nullable fields Support for Roslyn nullable annotations Jul 23, 2024
@aloneguid aloneguid self-requested a review September 6, 2024 13:34
aloneguid
aloneguid previously approved these changes Sep 6, 2024
Copy link
Owner

@aloneguid aloneguid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

# Conflicts:
#	src/Parquet/Parquet.csproj
@aloneguid aloneguid merged commit 246ec9f into aloneguid:master Sep 6, 2024
8 checks passed
@ErikApption ErikApption deleted the erik/nullable branch September 6, 2024 13:37
@aloneguid
Copy link
Owner

Sorry, will have to revert this as it changes default behavior. My bad, I missed it during PR review.

aloneguid added a commit that referenced this pull request Sep 30, 2024
@ErikApption
Copy link
Contributor Author

I could look at revising this pr to disable nullable support by default but any chances to consider changing the default in version 5? Working with files that are not generated by parquet.net is not intuitive without nullable support. There might be a compromise to limit issues and load null values into non nullable fields and simply show a warning.

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