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

[BUG]: empty string array incorrect serialization #481

Open
nd368 opened this issue Feb 26, 2024 · 0 comments
Open

[BUG]: empty string array incorrect serialization #481

nd368 opened this issue Feb 26, 2024 · 0 comments

Comments

@nd368
Copy link

nd368 commented Feb 26, 2024

Library Version

4.23.4

OS

Windows

OS Architecture

64 bit

How to reproduce?

Actual behaviour:
Empty string array serialized to a collection containing 1 NULL element

Expected behaviour:
Empty string array serialized to a collection containing no elements

class Example
{
    public string[] EmptyStringArray { get; } = Array.Empty<string>();
}

[Test]
public async Task MinimalExample()
{
    var tempFile = Path.GetTempPath() + "example.parquet";
    using var fileStream = new FileStream(tempFile, FileMode.Create);

    var objectWithEmptyStringArray = new Example();
    await ParquetSerializer.SerializeAsync(new List<Example> { objectWithEmptyStringArray }, fileStream);

    fileStream.Close();
    Console.Write($"Parquet file: {tempFile}");
}

Open generated file in any parquet file viewer --> EmptyStringArray is a collection with 1 NULL element

Failing test

No response

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

No branches or pull requests

1 participant