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

ParquetWriter invokes Stream.Write with empty buffer for empty values

Open yifatsor opened this issue 6 years ago • 1 comments

From version 3.5.3 (or maybe prior to it), when writing empty values, Stream.Write(byte[] buffer, int offset, int count) is invoked with buffer=byte[0], offset=0, count=0. Some streams implementations throw an exception in this case. This did not happen with earlier versions (I know it didn't happen with 3.3.4, I don't know when in between this was introduced). Would be great if you can fix it to not invoke the stream.Write method when there's nothing to write. repro: invoke ParquetWrite with some empty values.

Version: Parquet.Net v...

Runtime Version: .Net Framework v, .Net Core v etc.

OS: Windows/Linux/MacOSX v etc.

Expected behavior

Please describe how you expect Parquet.Net to work.

Actual behavior

Please describe how Parquet.Net is behaving.

Steps to reproduce the behavior

  1. Step 1.
  2. Step 2.

Code snippet reproducing the behavior

//here

yifatsor avatar Feb 06 '20 06:02 yifatsor

+1 on this issue

sloutsky avatar Feb 19 '20 07:02 sloutsky