parquet-dotnet icon indicating copy to clipboard operation
parquet-dotnet copied to clipboard

Enable support for nullable Boolean

Open DBojsen opened this issue 3 years ago • 0 comments

Fixes

Issue when Deserializing a file that has been saved with Python or C# including a nullable Boolean. Before, it was mapped to wrong output (False -> True, True -> False) when Deserializing (in the generic IL code).

I am certain that the fix is not ready to be merged in current state, but wanted to raise PR to get awareness on issue, and work with you to make the perfect fix. The code in the current state maps correctly for both nullable and not nullable booleans: Nullable Null -> False Nullable True -> True Nullable False -> False False -> False True -> True

Description

  • Inclusion of a NullableBooleanToBoolean converter.
  • When detecting that data is in fact Nullable Boolean, change the CLR type on DataField (required making setter public)
  • When invokink GenerateAssigner, use DataField definition saved on DataColumn instead of cashed version, which will be wrong for columns with Nullable Booleans
  • [ No] I have included unit tests validating this fix.
  • [ No] I have updated markdown documentation where required.
  • [ Yes] I understand that successful approval of my pull request requires reproducible tests as per Contribution Guideline.

DBojsen avatar May 16 '21 17:05 DBojsen