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

Guid properties are not serialized by ParquetConvert.Serialize

Open stefer opened this issue 2 years ago • 1 comments

Version: Parquet.Net v3.9.1

Runtime Version: .Net Core v6

OS: Windows/Linux

Expected behavior

Guid properties should be serialized when using ParquetConvert.Serialize. Preferrably, Guids are serialized as UUID type.

Actual behavior

Guid properties are not serialized.

Steps to reproduce the behavior

  1. Class with public Guid property
  2. call ParquetConvert.Serialize

Code snippet reproducing the behavior

using Parquet;
using System.IO;

class Test {
  public int IntProperty { get; set; } = 23;
  public Guid GuidProperty { get; set; } = Guid.Empty;
}

public class Program {
    public static void Main() {
        var values = Enumerable.Range(1, 20).Select(x => new Test {IntProperty = x, GuidProperty = Guid.NewGuid() });
    
        using (var stream = File.Create("C:\\temp\\NoGuid.parquet")) {
            ParquetConvert.Serialize(values, stream);
        }
    }
}

NoGuid.zip

stefer avatar Apr 25 '22 12:04 stefer

Also interested in this one - saw there was a fork a while back to add Guid/UUID support but it was never merged

BillyHouston avatar Sep 22 '22 14:09 BillyHouston

class serialization is experimental so it's not supported at the moment

aloneguid avatar Dec 01 '22 12:12 aloneguid