parquet-dotnet
parquet-dotnet copied to clipboard
Guid properties are not serialized by ParquetConvert.Serialize
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
- Class with public Guid property
- 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);
}
}
}
Also interested in this one - saw there was a fork a while back to add Guid/UUID support but it was never merged
class serialization is experimental so it's not supported at the moment