diff --git a/csharp.test/TestColumnWriter.cs b/csharp.test/TestColumnWriter.cs index 0635e501..1f522922 100644 --- a/csharp.test/TestColumnWriter.cs +++ b/csharp.test/TestColumnWriter.cs @@ -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.Empty, values); writer.Close(); } diff --git a/csharp/ColumnReader.cs b/csharp/ColumnReader.cs index 916d449f..580d74f7 100644 --- a/csharp/ColumnReader.cs +++ b/csharp/ColumnReader.cs @@ -222,7 +222,7 @@ public override TReturn Apply(IColumnReaderVisitor visitor) public long ReadBatch(long batchSize, Span values, out long valuesRead) { - return ReadBatch(batchSize, null, null, values, out valuesRead); + return ReadBatch(batchSize, Span.Empty, Span.Empty, values, out valuesRead); } public unsafe long ReadBatch(long batchSize, Span defLevels, Span repLevels, Span values, out long valuesRead) diff --git a/csharp/ColumnWriter.cs b/csharp/ColumnWriter.cs index 809d6557..cbd8e0de 100644 --- a/csharp/ColumnWriter.cs +++ b/csharp/ColumnWriter.cs @@ -271,7 +271,7 @@ public override TReturn Apply(IColumnWriterVisitor visitor) /// The values to write. public void WriteBatch(ReadOnlySpan values) { - WriteBatch(values.Length, null, null, values); + WriteBatch(values.Length, ReadOnlySpan.Empty, ReadOnlySpan.Empty, values); } /// diff --git a/csharp/LogicalBatchWriter/ArrayWriter.cs b/csharp/LogicalBatchWriter/ArrayWriter.cs index d02c2d30..09591684 100644 --- a/csharp/LogicalBatchWriter/ArrayWriter.cs +++ b/csharp/LogicalBatchWriter/ArrayWriter.cs @@ -49,7 +49,7 @@ public void WriteBatch(ReadOnlySpan values) { // Write zero length array _physicalWriter.WriteBatch( - 1, arrayDefinitionLevel, arrayRepetitionLevel, Array.Empty()); + 1, arrayDefinitionLevel, arrayRepetitionLevel, ReadOnlySpan.Empty); } } else if (!_optionalArrays) @@ -60,7 +60,7 @@ public void WriteBatch(ReadOnlySpan values) { // Write a null array entry _physicalWriter.WriteBatch( - 1, nullDefinitionLevel, arrayRepetitionLevel, Array.Empty()); + 1, nullDefinitionLevel, arrayRepetitionLevel, ReadOnlySpan.Empty); } if (i == 0) diff --git a/csharp/LogicalBatchWriter/OptionalNestedWriter.cs b/csharp/LogicalBatchWriter/OptionalNestedWriter.cs index aae52332..97584443 100644 --- a/csharp/LogicalBatchWriter/OptionalNestedWriter.cs +++ b/csharp/LogicalBatchWriter/OptionalNestedWriter.cs @@ -98,8 +98,8 @@ public void WriteBatch(ReadOnlySpan?> values) _physicalWriter.WriteBatch( nullSpanSize, _buffers.DefLevels.AsSpan(0, nullSpanSize), - _buffers.RepLevels == null ? null : _buffers.RepLevels.AsSpan(0, nullSpanSize), - Array.Empty()); + _buffers.RepLevels == null ? ReadOnlySpan.Empty : _buffers.RepLevels.AsSpan(0, nullSpanSize), + ReadOnlySpan.Empty); offset += nullSpanSize; }