Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions csharp.benchmark/FloatArrayTimeSeriesRead.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Apache.Arrow;
Expand All @@ -28,7 +27,12 @@ public FloatArrayTimeSeriesRead()
_allObjectIds = dates.SelectMany(d => objectIds).ToArray();
_allValues = dates.SelectMany((d, i) => values[i]).ToArray();

using (var fileWriter = new ParquetFileWriter(Filename, CreateFloatArrayColumns(), Compression.Snappy))
using var writerPropertiesBuilder = new WriterPropertiesBuilder();
// Disable writing page indexes to work around https://github.com/apache/arrow/issues/47027
using var writerProperties = writerPropertiesBuilder
.DisableWritePageIndex()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add comment with an explanation, that this is a workaround for apache/arrow#47027

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've added a comment now.

Although after looking into this more, I think we might want to override this in the default writer properties before releasing 20.0.0 as this could affect anyone writing lists/arrays with a lot of rows in one row group.

.Build();
using (var fileWriter = new ParquetFileWriter(Filename, CreateFloatArrayColumns(), writerProperties))
{
using var rowGroupWriter = fileWriter.AppendRowGroup();

Expand Down