-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
[BUG]: non null string fails with InvalidDataException and is wrongly flagged as nullable #535
Comments
I'm not sure how to reproduce this to be honest, are you trying to deserialise a particular file with class serializer? Do you have a sample? |
Yes I am trying to deserialize a class similar to I added unit tests in my PR to show the issue. class PocoClassNotNullable {
[JsonPropertyName("id")]
public long Id { get; set; }
[JsonPropertyName("value")]
public string Value { get; set; } = null!;
[JsonPropertyName("frequency")]
public double Frequency { get; set; }
}
[Fact]
public void Strings_NotNullable() {
ParquetSchema s = typeof(PocoClassNotNullable).GetParquetSchema(true);
Assert.False(s.DataFields[0].IsNullable);
Assert.False(s.DataFields[1].IsNullable);
Assert.False(s.DataFields[2].IsNullable);
} This fails with current version and |
@aloneguid bumping this up - any chances you could look at my PR? |
Library Version
4.25.0-pre.2
OS
Windows
OS Architecture
64 bit
How to reproduce?
Deserialize simple parquet file with schema (obtained from Tad - the parquet file also crashes floor)
"System.IO.InvalidDataException: 'property 'Value' is declared as 'value (System.String?)' but source data has it as 'value (System.String)''"
with
The important part to note is that the exception is the same wherever Value is defined as nullable or not.
ends up with exactly same error message.
Failing test
The text was updated successfully, but these errors were encountered: