Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion csharp.test/TestColumnWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void TestWriteBatchWithNullOptionalField()
var defLevels = new short[] { 1, 0, 1 };
var values = new[] { 1, 2 };

colWriter.WriteBatch(defLevels.Length, defLevels, null, values);
colWriter.WriteBatch(defLevels.Length, defLevels, ReadOnlySpan<short>.Empty, values);

writer.Close();
}
Expand Down
2 changes: 1 addition & 1 deletion csharp/ColumnReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public override TReturn Apply<TReturn>(IColumnReaderVisitor<TReturn> visitor)

public long ReadBatch(long batchSize, Span<TValue> values, out long valuesRead)
{
return ReadBatch(batchSize, null, null, values, out valuesRead);
return ReadBatch(batchSize, Span<short>.Empty, Span<short>.Empty, values, out valuesRead);
}

public unsafe long ReadBatch(long batchSize, Span<short> defLevels, Span<short> repLevels, Span<TValue> values, out long valuesRead)
Expand Down
2 changes: 1 addition & 1 deletion csharp/ColumnWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public override TReturn Apply<TReturn>(IColumnWriterVisitor<TReturn> visitor)
/// <param name="values">The values to write.</param>
public void WriteBatch(ReadOnlySpan<TValue> values)
{
WriteBatch(values.Length, null, null, values);
WriteBatch(values.Length, ReadOnlySpan<short>.Empty, ReadOnlySpan<short>.Empty, values);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions csharp/LogicalBatchWriter/ArrayWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void WriteBatch(ReadOnlySpan<TItem[]> values)
{
// Write zero length array
_physicalWriter.WriteBatch(
1, arrayDefinitionLevel, arrayRepetitionLevel, Array.Empty<TPhysical>());
1, arrayDefinitionLevel, arrayRepetitionLevel, ReadOnlySpan<TPhysical>.Empty);
}
}
else if (!_optionalArrays)
Expand All @@ -60,7 +60,7 @@ public void WriteBatch(ReadOnlySpan<TItem[]> values)
{
// Write a null array entry
_physicalWriter.WriteBatch(
1, nullDefinitionLevel, arrayRepetitionLevel, Array.Empty<TPhysical>());
1, nullDefinitionLevel, arrayRepetitionLevel, ReadOnlySpan<TPhysical>.Empty);
}

if (i == 0)
Expand Down
4 changes: 2 additions & 2 deletions csharp/LogicalBatchWriter/OptionalNestedWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public void WriteBatch(ReadOnlySpan<Nested<TItem>?> values)
_physicalWriter.WriteBatch(
nullSpanSize,
_buffers.DefLevels.AsSpan(0, nullSpanSize),
_buffers.RepLevels == null ? null : _buffers.RepLevels.AsSpan(0, nullSpanSize),
Array.Empty<TPhysical>());
_buffers.RepLevels == null ? ReadOnlySpan<short>.Empty : _buffers.RepLevels.AsSpan(0, nullSpanSize),
ReadOnlySpan<TPhysical>.Empty);
offset += nullSpanSize;
}

Expand Down
Loading