You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2025/08/26 00:34:58 UTC
(arrow-dotnet) branch main updated: chore: Check format in CI (#20)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-dotnet.git
The following commit(s) were added to refs/heads/main by this push:
new 243f1b7 chore: Check format in CI (#20)
243f1b7 is described below
commit 243f1b76f797f4c7a2f91229ab96f44221a08257
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Tue Aug 26 09:34:53 2025 +0900
chore: Check format in CI (#20)
## What's Changed
Run `dotnet format` via pre-commit.
This excludes `src/Apache.Arrow/Flatbuf/FlatBuffers/` because it's a
bundled source codes.
See also: #18
Closes #2.
---------
Co-authored-by: Adam Reeve <ad...@gmail.com>
---
.pre-commit-config.yaml | 7 +++
.../Lz4CompressionCodec.cs | 2 +-
src/Apache.Arrow.Flight.Sql/DoPutResult.cs | 4 +-
src/Apache.Arrow.Flight.Sql/FlightCallOptions.cs | 2 +-
src/Apache.Arrow.Flight.Sql/FlightExtensions.cs | 2 +-
src/Apache.Arrow.Flight.Sql/FlightSqlServer.cs | 6 +-
src/Apache.Arrow.Flight.Sql/PreparedStatement.cs | 6 +-
src/Apache.Arrow.Flight.Sql/SchemaExtensions.cs | 6 +-
.../Client/FlightClientRecordBatchStreamReader.cs | 2 +-
.../Client/FlightClientRecordBatchStreamWriter.cs | 2 +-
.../Client/FlightRecordBatchExchangeCall.cs | 2 +-
.../Extensions/FlightInfoExtensions.cs | 2 +-
src/Apache.Arrow.Flight/FlightActionType.cs | 2 +-
src/Apache.Arrow.Flight/FlightDescriptor.cs | 6 +-
src/Apache.Arrow.Flight/FlightEndpoint.cs | 4 +-
src/Apache.Arrow.Flight/FlightHandshakeRequest.cs | 2 +-
src/Apache.Arrow.Flight/FlightInfo.cs | 8 +--
src/Apache.Arrow.Flight/FlightLocation.cs | 2 +-
src/Apache.Arrow.Flight/FlightResult.cs | 2 +-
src/Apache.Arrow.Flight/FlightTicket.cs | 2 +-
.../Internal/FlightDataStream.cs | 4 +-
.../Internal/RecordBatchReaderImplementation.cs | 2 +-
src/Apache.Arrow.Flight/Internal/SchemaWriter.cs | 2 +-
src/Apache.Arrow/Arrays/ArrayData.cs | 4 +-
src/Apache.Arrow/Arrays/ArrayDataConcatenator.cs | 8 +--
src/Apache.Arrow/Arrays/ArrayDataTypeComparer.cs | 2 +-
.../Arrays/ArrowArrayBuilderFactory.cs | 2 +-
src/Apache.Arrow/Arrays/ArrowArrayConcatenator.cs | 8 +--
src/Apache.Arrow/Arrays/ArrowArrayFactory.cs | 2 +-
src/Apache.Arrow/Arrays/BinaryArray.cs | 4 +-
src/Apache.Arrow/Arrays/BinaryViewArray.cs | 8 +--
src/Apache.Arrow/Arrays/BooleanArray.cs | 8 +--
src/Apache.Arrow/Arrays/Date32Array.cs | 2 +-
src/Apache.Arrow/Arrays/Date64Array.cs | 2 +-
src/Apache.Arrow/Arrays/DenseUnionArray.cs | 4 +-
src/Apache.Arrow/Arrays/FixedSizeBinaryArray.cs | 5 +-
src/Apache.Arrow/Arrays/HalfFloatArray.cs | 2 +-
src/Apache.Arrow/Arrays/Int16Array.cs | 2 +-
src/Apache.Arrow/Arrays/LargeBinaryArray.cs | 2 +-
src/Apache.Arrow/Arrays/LargeStringArray.cs | 2 +-
src/Apache.Arrow/Arrays/MapArray.cs | 4 +-
src/Apache.Arrow/Arrays/NullArray.cs | 2 +-
src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs | 2 +-
src/Apache.Arrow/Arrays/SparseUnionArray.cs | 4 +-
src/Apache.Arrow/Arrays/StringArray.cs | 2 +-
src/Apache.Arrow/Arrays/StringViewArray.cs | 4 +-
src/Apache.Arrow/Arrays/StructArray.cs | 2 +-
src/Apache.Arrow/Arrays/Time32Array.cs | 4 +-
src/Apache.Arrow/Arrays/Time64Array.cs | 2 +-
src/Apache.Arrow/Arrays/TimestampArray.cs | 11 ++--
src/Apache.Arrow/Arrays/UInt8Array.cs | 5 +-
src/Apache.Arrow/Arrays/UnionArray.cs | 4 +-
src/Apache.Arrow/ArrowBuffer.BitmapBuilder.cs | 6 +-
src/Apache.Arrow/ArrowBuffer.Builder.cs | 2 +-
src/Apache.Arrow/BitUtility.cs | 8 +--
src/Apache.Arrow/C/CArrowArrayExporter.cs | 4 +-
src/Apache.Arrow/ChunkedArray.cs | 2 +-
src/Apache.Arrow/Column.cs | 2 +-
src/Apache.Arrow/DecimalUtility.cs | 2 +-
src/Apache.Arrow/Extensions/ArrayDataExtensions.cs | 2 +-
src/Apache.Arrow/Extensions/ArrowTypeExtensions.cs | 4 +-
src/Apache.Arrow/Extensions/SpanExtensions.cs | 4 +-
src/Apache.Arrow/Extensions/StreamExtensions.cs | 2 +-
src/Apache.Arrow/Field.Builder.cs | 2 +-
src/Apache.Arrow/Interfaces/IArrowArrayBuilder.cs | 2 +-
src/Apache.Arrow/Interfaces/IArrowArrayVisitor.cs | 4 +-
src/Apache.Arrow/Ipc/ArrowFileReader.cs | 2 +-
.../Ipc/ArrowFileReaderImplementation.cs | 2 +-
.../Ipc/ArrowMemoryReaderImplementation.cs | 4 +-
src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs | 2 +-
src/Apache.Arrow/Ipc/ArrowStreamReader.cs | 2 +-
.../Ipc/ArrowStreamReaderImplementation.cs | 2 +-
src/Apache.Arrow/Ipc/ArrowStreamWriter.cs | 10 ++--
src/Apache.Arrow/Ipc/ArrowTypeFlatbufferBuilder.cs | 2 +-
src/Apache.Arrow/Ipc/DictionaryMemo.cs | 2 +-
.../Ipc/ReadOnlyMemoryBufferAllocator.cs | 2 +-
src/Apache.Arrow/Memory/ExportedAllocationOwner.cs | 2 +-
src/Apache.Arrow/Memory/NativeMemoryAllocator.cs | 4 +-
src/Apache.Arrow/Memory/NullMemoryOwner.cs | 2 +-
src/Apache.Arrow/RecordBatch.Builder.cs | 14 ++---
src/Apache.Arrow/Schema.cs | 2 +-
src/Apache.Arrow/Types/ArrowType.cs | 4 +-
src/Apache.Arrow/Types/BinaryType.cs | 2 +-
src/Apache.Arrow/Types/BinaryViewType.cs | 2 +-
src/Apache.Arrow/Types/BooleanType.cs | 2 +-
src/Apache.Arrow/Types/Date32Type.cs | 2 +-
src/Apache.Arrow/Types/DateType.cs | 2 +-
src/Apache.Arrow/Types/Decimal256Type.cs | 2 +-
src/Apache.Arrow/Types/DoubleType.cs | 2 +-
src/Apache.Arrow/Types/FixedWidthType.cs | 2 +-
src/Apache.Arrow/Types/FloatType.cs | 2 +-
src/Apache.Arrow/Types/FloatingPointType.cs | 2 +-
src/Apache.Arrow/Types/HalfFloatType.cs | 2 +-
src/Apache.Arrow/Types/IArrowType.cs | 4 +-
src/Apache.Arrow/Types/IArrowTypeVisitor.cs | 4 +-
src/Apache.Arrow/Types/IntegerType.cs | 2 +-
src/Apache.Arrow/Types/LargeBinaryType.cs | 2 +-
src/Apache.Arrow/Types/NumberType.cs | 2 +-
src/Apache.Arrow/Types/TimeUnit.cs | 2 +-
.../ArrowReaderBenchmark.cs | 8 +--
.../ArrowWriterBenchmark.cs | 6 +-
test/Apache.Arrow.Benchmarks/Program.cs | 2 +-
.../ArrowFileReaderTests.cs | 6 +-
.../ArrowFileWriterTests.cs | 4 +-
.../ArrowStreamReaderTests.cs | 6 +-
.../ArrowStreamWriterTests.cs | 10 ++--
.../Scenarios/JsonTestScenario.cs | 2 +-
.../FlightSqlClientTests.cs | 4 +-
.../FlightSqlPreparedStatementTests.cs | 6 +-
.../FlightSqlServerTests.cs | 24 ++++----
.../FlightSqlTestExtensions.cs | 22 ++++----
.../FlightSqlTestUtils.cs | 2 +-
test/Apache.Arrow.Flight.Sql.Tests/Startup.cs | 2 +-
.../TestFlightSqlSever.cs | 4 +-
.../TestFlightSqlWebFactory.cs | 2 +-
test/Apache.Arrow.Flight.TestWeb/FlightHolder.cs | 8 +--
.../TestFlightServer.cs | 14 ++---
.../TestFlightSqlServer.cs | 8 +--
.../FlightInfoComparer.cs | 2 +-
test/Apache.Arrow.Flight.Tests/FlightTests.cs | 2 +-
.../Apache.Arrow.IntegrationTest/CDataInterface.cs | 10 ++--
test/Apache.Arrow.IntegrationTest/Program.cs | 2 +-
test/Apache.Arrow.Tests/ArrayBuilderTests.cs | 2 +-
.../ArrowArrayConcatenatorTests.cs | 6 +-
test/Apache.Arrow.Tests/ArrowArrayTests.cs | 12 ++--
.../ArrowBufferBitmapBuilderTests.cs | 66 +++++++++++-----------
test/Apache.Arrow.Tests/ArrowBufferTests.cs | 8 +--
test/Apache.Arrow.Tests/ArrowFileReaderTests.cs | 2 +-
test/Apache.Arrow.Tests/ArrowFileWriterTests.cs | 2 +-
test/Apache.Arrow.Tests/ArrowReaderVerifier.cs | 6 +-
test/Apache.Arrow.Tests/ArrowStreamReaderTests.cs | 4 +-
test/Apache.Arrow.Tests/ArrowStreamWriterTests.cs | 11 ++--
test/Apache.Arrow.Tests/BinaryViewArrayTests.cs | 4 +-
test/Apache.Arrow.Tests/BitUtilityTests.cs | 4 +-
test/Apache.Arrow.Tests/BooleanArrayTests.cs | 8 +--
.../CDataInterfacePythonTests.cs | 6 +-
test/Apache.Arrow.Tests/ColumnTests.cs | 2 +-
test/Apache.Arrow.Tests/Decimal256ArrayTests.cs | 14 ++---
.../Extensions/DateTimeOffsetExtensions.cs | 2 +-
.../FixedSizeBinaryArrayTests.cs | 6 +-
test/Apache.Arrow.Tests/IntervalScalarTests.cs | 2 +-
test/Apache.Arrow.Tests/LargeListArrayTests.cs | 2 +-
test/Apache.Arrow.Tests/SchemaBuilderTests.cs | 8 +--
test/Apache.Arrow.Tests/StructArrayTests.cs | 32 +++++------
test/Apache.Arrow.Tests/TestData.cs | 10 ++--
test/Apache.Arrow.Tests/TestMemoryAllocator.cs | 2 +-
test/Apache.Arrow.Tests/TypeTests.cs | 2 +-
test/Apache.Arrow.Tests/UnionArrayTests.cs | 2 +-
148 files changed, 363 insertions(+), 352 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a433287..da66369 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -35,3 +35,10 @@ repos:
rm -f apache-arrow-dotnet.tar.gz"
always_run: true
pass_filenames: false
+ - id: format
+ name: Format
+ language: system
+ entry: |
+ dotnet format --exclude src/Apache.Arrow/Flatbuf/FlatBuffers/
+ always_run: true
+ pass_filenames: false
diff --git a/src/Apache.Arrow.Compression/Lz4CompressionCodec.cs b/src/Apache.Arrow.Compression/Lz4CompressionCodec.cs
index ec48d89..972b2a3 100644
--- a/src/Apache.Arrow.Compression/Lz4CompressionCodec.cs
+++ b/src/Apache.Arrow.Compression/Lz4CompressionCodec.cs
@@ -33,7 +33,7 @@ namespace Apache.Arrow.Compression
{
_settings = new LZ4EncoderSettings
{
- CompressionLevel = (LZ4Level) compressionLevel
+ CompressionLevel = (LZ4Level)compressionLevel
};
}
else
diff --git a/src/Apache.Arrow.Flight.Sql/DoPutResult.cs b/src/Apache.Arrow.Flight.Sql/DoPutResult.cs
index 357c7a2..6e20c40 100644
--- a/src/Apache.Arrow.Flight.Sql/DoPutResult.cs
+++ b/src/Apache.Arrow.Flight.Sql/DoPutResult.cs
@@ -30,7 +30,7 @@ public class DoPutResult
Writer = writer;
Reader = reader;
}
-
+
/// <summary>
/// Reads the metadata asynchronously from the reader.
/// </summary>
@@ -43,7 +43,7 @@ public class DoPutResult
}
throw new RpcException(new Status(StatusCode.Internal, "No metadata available in the response stream."));
}
-
+
/// <summary>
/// Completes the writer by signaling the end of the writing process.
/// </summary>
diff --git a/src/Apache.Arrow.Flight.Sql/FlightCallOptions.cs b/src/Apache.Arrow.Flight.Sql/FlightCallOptions.cs
index 17541b2..f4fe538 100644
--- a/src/Apache.Arrow.Flight.Sql/FlightCallOptions.cs
+++ b/src/Apache.Arrow.Flight.Sql/FlightCallOptions.cs
@@ -26,7 +26,7 @@ public class FlightCallOptions
{
Timeout = TimeSpan.FromSeconds(-1);
}
-
+
// Implement any necessary options for RPC calls
public Metadata Headers { get; set; } = new();
diff --git a/src/Apache.Arrow.Flight.Sql/FlightExtensions.cs b/src/Apache.Arrow.Flight.Sql/FlightExtensions.cs
index a0936eb..81d48dd 100644
--- a/src/Apache.Arrow.Flight.Sql/FlightExtensions.cs
+++ b/src/Apache.Arrow.Flight.Sql/FlightExtensions.cs
@@ -38,4 +38,4 @@ internal static class FlightExtensions
return length;
}
-}
\ No newline at end of file
+}
diff --git a/src/Apache.Arrow.Flight.Sql/FlightSqlServer.cs b/src/Apache.Arrow.Flight.Sql/FlightSqlServer.cs
index cbccc9d..f286299 100644
--- a/src/Apache.Arrow.Flight.Sql/FlightSqlServer.cs
+++ b/src/Apache.Arrow.Flight.Sql/FlightSqlServer.cs
@@ -30,9 +30,9 @@ namespace Apache.Arrow.Flight.Sql;
public abstract class FlightSqlServer : FlightServer
{
private ILogger? Logger { get; }
- public static readonly Schema CatalogSchema = new(new List<Field> {new("catalog_name", StringType.Default, false)}, null);
- public static readonly Schema TableTypesSchema = new(new List<Field> {new("table_type", StringType.Default, false)}, null);
- public static readonly Schema DbSchemaFlightSchema = new(new List<Field> {new("catalog_name", StringType.Default, true), new("db_schema_name", StringType.Default, false)}, null);
+ public static readonly Schema CatalogSchema = new(new List<Field> { new("catalog_name", StringType.Default, false) }, null);
+ public static readonly Schema TableTypesSchema = new(new List<Field> { new("table_type", StringType.Default, false) }, null);
+ public static readonly Schema DbSchemaFlightSchema = new(new List<Field> { new("catalog_name", StringType.Default, true), new("db_schema_name", StringType.Default, false) }, null);
public static readonly Schema PrimaryKeysSchema = new(new List<Field>
{
diff --git a/src/Apache.Arrow.Flight.Sql/PreparedStatement.cs b/src/Apache.Arrow.Flight.Sql/PreparedStatement.cs
index 0c49d03..b7dd245 100644
--- a/src/Apache.Arrow.Flight.Sql/PreparedStatement.cs
+++ b/src/Apache.Arrow.Flight.Sql/PreparedStatement.cs
@@ -230,10 +230,10 @@ public class PreparedStatement : IDisposable, IAsyncDisposable
{
PreparedStatementHandle = ByteString.CopyFrom(_handle, Encoding.UTF8),
};
-
+
var descriptor = FlightDescriptor.CreateCommandDescriptor(command.PackAndSerialize());
cancellationToken.ThrowIfCancellationRequested();
-
+
if (_recordsBatch != null)
{
await BindParametersAsync(descriptor, _recordsBatch, options, cancellationToken).ConfigureAwait(false);
@@ -286,7 +286,7 @@ public class PreparedStatement : IDisposable, IAsyncDisposable
{
throw new ArgumentNullException(nameof(parameterBatch), "Parameter batch cannot be null.");
}
-
+
var command = new CommandPreparedStatementQuery
{
PreparedStatementHandle = ByteString.CopyFrom(_handle, Encoding.UTF8),
diff --git a/src/Apache.Arrow.Flight.Sql/SchemaExtensions.cs b/src/Apache.Arrow.Flight.Sql/SchemaExtensions.cs
index e734736..6519881 100644
--- a/src/Apache.Arrow.Flight.Sql/SchemaExtensions.cs
+++ b/src/Apache.Arrow.Flight.Sql/SchemaExtensions.cs
@@ -35,7 +35,7 @@ public static class SchemaExtensions
using var reader = new ArrowStreamReader(serializedSchema);
return reader.Schema;
}
-
+
/// <summary>
/// Serializes the provided schema to a byte array.
/// </summary>
@@ -43,8 +43,8 @@ public static class SchemaExtensions
{
using var memoryStream = new MemoryStream();
using var writer = new ArrowStreamWriter(memoryStream, schema);
- writer.WriteStart();
+ writer.WriteStart();
writer.WriteEnd();
return memoryStream.ToArray();
}
-}
\ No newline at end of file
+}
diff --git a/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamReader.cs b/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamReader.cs
index 7309433..65eb6b6 100644
--- a/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamReader.cs
+++ b/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamReader.cs
@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Flight.Protocol;
using Apache.Arrow.Flight.Internal;
+using Apache.Arrow.Flight.Protocol;
using Grpc.Core;
namespace Apache.Arrow.Flight.Client
diff --git a/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamWriter.cs b/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamWriter.cs
index e5fa30c..daf6a00 100644
--- a/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamWriter.cs
+++ b/src/Apache.Arrow.Flight/Client/FlightClientRecordBatchStreamWriter.cs
@@ -17,8 +17,8 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
-using Apache.Arrow.Flight.Protocol;
using Apache.Arrow.Flight.Internal;
+using Apache.Arrow.Flight.Protocol;
using Grpc.Core;
namespace Apache.Arrow.Flight.Client
diff --git a/src/Apache.Arrow.Flight/Client/FlightRecordBatchExchangeCall.cs b/src/Apache.Arrow.Flight/Client/FlightRecordBatchExchangeCall.cs
index 76f0b17..1305913 100644
--- a/src/Apache.Arrow.Flight/Client/FlightRecordBatchExchangeCall.cs
+++ b/src/Apache.Arrow.Flight/Client/FlightRecordBatchExchangeCall.cs
@@ -14,8 +14,8 @@
// limitations under the License.
using System;
-using Grpc.Core;
using System.Threading.Tasks;
+using Grpc.Core;
namespace Apache.Arrow.Flight.Client
{
diff --git a/src/Apache.Arrow.Flight/Extensions/FlightInfoExtensions.cs b/src/Apache.Arrow.Flight/Extensions/FlightInfoExtensions.cs
index 706e092..3b89963 100644
--- a/src/Apache.Arrow.Flight/Extensions/FlightInfoExtensions.cs
+++ b/src/Apache.Arrow.Flight/Extensions/FlightInfoExtensions.cs
@@ -21,7 +21,7 @@ namespace Apache.Arrow.Flight.Extensions
public static class FlightInfoExtensions
{
public static ByteString ToByteString(this FlightInfo flightInfo)
- {
+ {
return flightInfo.ToProtocol().ToByteString();
}
}
diff --git a/src/Apache.Arrow.Flight/FlightActionType.cs b/src/Apache.Arrow.Flight/FlightActionType.cs
index 8df8939..c52c37c 100644
--- a/src/Apache.Arrow.Flight/FlightActionType.cs
+++ b/src/Apache.Arrow.Flight/FlightActionType.cs
@@ -46,7 +46,7 @@ namespace Apache.Arrow.Flight
public override bool Equals(object obj)
{
- if(obj is FlightActionType other)
+ if (obj is FlightActionType other)
{
return Equals(_actionType, other._actionType);
}
diff --git a/src/Apache.Arrow.Flight/FlightDescriptor.cs b/src/Apache.Arrow.Flight/FlightDescriptor.cs
index 7d44332..a7c709c 100644
--- a/src/Apache.Arrow.Flight/FlightDescriptor.cs
+++ b/src/Apache.Arrow.Flight/FlightDescriptor.cs
@@ -41,7 +41,7 @@ namespace Apache.Arrow.Flight
Type = Protocol.FlightDescriptor.Types.DescriptorType.Path
};
- foreach(var path in paths)
+ foreach (var path in paths)
{
_flightDescriptor.Path.Add(path);
}
@@ -66,7 +66,7 @@ namespace Apache.Arrow.Flight
internal FlightDescriptor(Protocol.FlightDescriptor flightDescriptor)
{
- if(flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Cmd && flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Path)
+ if (flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Cmd && flightDescriptor.Type != Protocol.FlightDescriptor.Types.DescriptorType.Path)
{
throw new NotSupportedException();
}
@@ -92,7 +92,7 @@ namespace Apache.Arrow.Flight
public override bool Equals(object obj)
{
- if(obj is FlightDescriptor other)
+ if (obj is FlightDescriptor other)
{
return Equals(_flightDescriptor, other._flightDescriptor);
}
diff --git a/src/Apache.Arrow.Flight/FlightEndpoint.cs b/src/Apache.Arrow.Flight/FlightEndpoint.cs
index ab15fed..b99f3f3 100644
--- a/src/Apache.Arrow.Flight/FlightEndpoint.cs
+++ b/src/Apache.Arrow.Flight/FlightEndpoint.cs
@@ -47,7 +47,7 @@ namespace Apache.Arrow.Flight
Ticket = _ticket.ToProtocol()
};
- foreach(var location in _locations)
+ foreach (var location in _locations)
{
output.Location.Add(location.ToProtocol());
}
@@ -56,7 +56,7 @@ namespace Apache.Arrow.Flight
public override bool Equals(object obj)
{
- if(obj is FlightEndpoint other)
+ if (obj is FlightEndpoint other)
{
return Equals(_ticket, other._ticket) &&
Enumerable.SequenceEqual(_locations, other._locations);
diff --git a/src/Apache.Arrow.Flight/FlightHandshakeRequest.cs b/src/Apache.Arrow.Flight/FlightHandshakeRequest.cs
index 62db644..2df9652 100644
--- a/src/Apache.Arrow.Flight/FlightHandshakeRequest.cs
+++ b/src/Apache.Arrow.Flight/FlightHandshakeRequest.cs
@@ -44,7 +44,7 @@ public class FlightHandshakeRequest
public override bool Equals(object obj)
{
- if(obj is FlightHandshakeRequest other)
+ if (obj is FlightHandshakeRequest other)
{
return Equals(_result, other._result);
}
diff --git a/src/Apache.Arrow.Flight/FlightInfo.cs b/src/Apache.Arrow.Flight/FlightInfo.cs
index 22cd219..1f80ffe 100644
--- a/src/Apache.Arrow.Flight/FlightInfo.cs
+++ b/src/Apache.Arrow.Flight/FlightInfo.cs
@@ -30,7 +30,7 @@ namespace Apache.Arrow.Flight
Descriptor = new FlightDescriptor(flightInfo.FlightDescriptor);
var endpoints = new List<FlightEndpoint>();
- foreach(var endpoint in flightInfo.Endpoint)
+ foreach (var endpoint in flightInfo.Endpoint)
{
endpoints.Add(new FlightEndpoint(endpoint));
}
@@ -41,11 +41,11 @@ namespace Apache.Arrow.Flight
Ordered = flightInfo.Ordered;
AppMetadata = flightInfo.AppMetadata;
}
- public FlightInfo(Schema schema, FlightDescriptor descriptor, IReadOnlyList<FlightEndpoint> endpoints, long totalRecords = -1, long totalBytes = -1):this(schema,descriptor,endpoints,totalRecords,totalBytes,false, ByteString.Empty)
+ public FlightInfo(Schema schema, FlightDescriptor descriptor, IReadOnlyList<FlightEndpoint> endpoints, long totalRecords = -1, long totalBytes = -1) : this(schema, descriptor, endpoints, totalRecords, totalBytes, false, ByteString.Empty)
{
}
- public FlightInfo(Schema schema, FlightDescriptor descriptor, IReadOnlyList<FlightEndpoint> endpoints, long totalRecords, long totalBytes, bool ordered = false, ByteString appMetadata=null)
+ public FlightInfo(Schema schema, FlightDescriptor descriptor, IReadOnlyList<FlightEndpoint> endpoints, long totalRecords, long totalBytes, bool ordered = false, ByteString appMetadata = null)
{
Schema = schema;
Descriptor = descriptor;
@@ -81,7 +81,7 @@ namespace Apache.Arrow.Flight
TotalBytes = TotalBytes,
TotalRecords = TotalRecords,
Ordered = Ordered,
- AppMetadata = AppMetadata
+ AppMetadata = AppMetadata
};
foreach (var endpoint in Endpoints)
diff --git a/src/Apache.Arrow.Flight/FlightLocation.cs b/src/Apache.Arrow.Flight/FlightLocation.cs
index 25b9d5d..641ec04 100644
--- a/src/Apache.Arrow.Flight/FlightLocation.cs
+++ b/src/Apache.Arrow.Flight/FlightLocation.cs
@@ -44,7 +44,7 @@ namespace Apache.Arrow.Flight
public override bool Equals(object obj)
{
- if(obj is FlightLocation other)
+ if (obj is FlightLocation other)
{
return Equals(_location, other._location);
}
diff --git a/src/Apache.Arrow.Flight/FlightResult.cs b/src/Apache.Arrow.Flight/FlightResult.cs
index 3ddadd4..8ae1dec 100644
--- a/src/Apache.Arrow.Flight/FlightResult.cs
+++ b/src/Apache.Arrow.Flight/FlightResult.cs
@@ -56,7 +56,7 @@ namespace Apache.Arrow.Flight
public override bool Equals(object obj)
{
- if(obj is FlightResult other)
+ if (obj is FlightResult other)
{
return Equals(_result, other._result);
}
diff --git a/src/Apache.Arrow.Flight/FlightTicket.cs b/src/Apache.Arrow.Flight/FlightTicket.cs
index 7b3d6dd..b55af21 100644
--- a/src/Apache.Arrow.Flight/FlightTicket.cs
+++ b/src/Apache.Arrow.Flight/FlightTicket.cs
@@ -55,7 +55,7 @@ namespace Apache.Arrow.Flight
public override bool Equals(object obj)
{
- if(obj is FlightTicket other)
+ if (obj is FlightTicket other)
{
return Equals(_ticket, other._ticket);
}
diff --git a/src/Apache.Arrow.Flight/Internal/FlightDataStream.cs b/src/Apache.Arrow.Flight/Internal/FlightDataStream.cs
index 7cbbe66..9c661de 100644
--- a/src/Apache.Arrow.Flight/Internal/FlightDataStream.cs
+++ b/src/Apache.Arrow.Flight/Internal/FlightDataStream.cs
@@ -48,7 +48,7 @@ namespace Apache.Arrow.Flight.Internal
{
_currentFlightData = new Protocol.FlightData();
- if(_flightDescriptor != null)
+ if (_flightDescriptor != null)
{
_currentFlightData.FlightDescriptor = _flightDescriptor.ToProtocol();
}
@@ -76,7 +76,7 @@ namespace Apache.Arrow.Flight.Internal
_currentFlightData = new Protocol.FlightData();
- if(applicationMetadata != null)
+ if (applicationMetadata != null)
{
_currentFlightData.AppMetadata = applicationMetadata;
}
diff --git a/src/Apache.Arrow.Flight/Internal/RecordBatchReaderImplementation.cs b/src/Apache.Arrow.Flight/Internal/RecordBatchReaderImplementation.cs
index 22d0bd8..e3353e8 100644
--- a/src/Apache.Arrow.Flight/Internal/RecordBatchReaderImplementation.cs
+++ b/src/Apache.Arrow.Flight/Internal/RecordBatchReaderImplementation.cs
@@ -84,7 +84,7 @@ namespace Apache.Arrow.Flight.Internal
// AppMetadata will never be null, but length 0 if empty
// Those are skipped
- if(_flightDataStream.Current.AppMetadata.Length > 0)
+ if (_flightDataStream.Current.AppMetadata.Length > 0)
{
_applicationMetadatas.Add(_flightDataStream.Current.AppMetadata);
}
diff --git a/src/Apache.Arrow.Flight/Internal/SchemaWriter.cs b/src/Apache.Arrow.Flight/Internal/SchemaWriter.cs
index be27cb1..b8e38ed 100644
--- a/src/Apache.Arrow.Flight/Internal/SchemaWriter.cs
+++ b/src/Apache.Arrow.Flight/Internal/SchemaWriter.cs
@@ -43,7 +43,7 @@ namespace Apache.Arrow.Flight.Internal
public static ByteString SerializeSchema(Schema schema, CancellationToken cancellationToken = default(CancellationToken))
{
- using(var memoryStream = new MemoryStream())
+ using (var memoryStream = new MemoryStream())
{
var writer = new SchemaWriter(memoryStream, schema);
writer.WriteSchema(schema, cancellationToken);
diff --git a/src/Apache.Arrow/Arrays/ArrayData.cs b/src/Apache.Arrow/Arrays/ArrayData.cs
index cdb6ed6..25cda4d 100644
--- a/src/Apache.Arrow/Arrays/ArrayData.cs
+++ b/src/Apache.Arrow/Arrays/ArrayData.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Memory;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/ArrayDataConcatenator.cs b/src/Apache.Arrow/Arrays/ArrayDataConcatenator.cs
index fe2543b..609ebb9 100644
--- a/src/Apache.Arrow/Arrays/ArrayDataConcatenator.cs
+++ b/src/Apache.Arrow/Arrays/ArrayDataConcatenator.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+using System;
+using System.Collections.Generic;
using Apache.Arrow.Memory;
using Apache.Arrow.Scalars;
using Apache.Arrow.Types;
-using System;
-using System.Collections.Generic;
namespace Apache.Arrow
{
@@ -329,11 +329,11 @@ namespace Apache.Arrow
{
if (arrayData.NullCount == 0)
{
- builder.AppendRange(true , length);
+ builder.AppendRange(true, length);
}
else if (arrayData.NullCount == length)
{
- builder.AppendRange(false , length);
+ builder.AppendRange(false, length);
}
else
{
diff --git a/src/Apache.Arrow/Arrays/ArrayDataTypeComparer.cs b/src/Apache.Arrow/Arrays/ArrayDataTypeComparer.cs
index 2a5c386..c51139c 100644
--- a/src/Apache.Arrow/Arrays/ArrayDataTypeComparer.cs
+++ b/src/Apache.Arrow/Arrays/ArrayDataTypeComparer.cs
@@ -165,7 +165,7 @@ namespace Apache.Arrow
}
}
- return true;
+ return true;
}
public void Visit(IArrowType actualType)
diff --git a/src/Apache.Arrow/Arrays/ArrowArrayBuilderFactory.cs b/src/Apache.Arrow/Arrays/ArrowArrayBuilderFactory.cs
index 3fb77d2..4c4586a 100644
--- a/src/Apache.Arrow/Arrays/ArrowArrayBuilderFactory.cs
+++ b/src/Apache.Arrow/Arrays/ArrowArrayBuilderFactory.cs
@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/ArrowArrayConcatenator.cs b/src/Apache.Arrow/Arrays/ArrowArrayConcatenator.cs
index ac82522..56462e8 100644
--- a/src/Apache.Arrow/Arrays/ArrowArrayConcatenator.cs
+++ b/src/Apache.Arrow/Arrays/ArrowArrayConcatenator.cs
@@ -13,16 +13,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System.Collections.Generic;
+using Apache.Arrow.Memory;
namespace Apache.Arrow
{
public static class ArrowArrayConcatenator
{
- public static IArrowArray Concatenate(IReadOnlyList<IArrowArray> arrowArrayList , MemoryAllocator allocator = default)
+ public static IArrowArray Concatenate(IReadOnlyList<IArrowArray> arrowArrayList, MemoryAllocator allocator = default)
{
- if(arrowArrayList == null || arrowArrayList.Count == 0)
+ if (arrowArrayList == null || arrowArrayList.Count == 0)
{
return null;
}
@@ -34,7 +34,7 @@ namespace Apache.Arrow
var arrayDataList = new List<ArrayData>(arrowArrayList.Count);
- foreach(IArrowArray array in arrowArrayList)
+ foreach (IArrowArray array in arrowArrayList)
{
arrayDataList.Add(array.Data);
}
diff --git a/src/Apache.Arrow/Arrays/ArrowArrayFactory.cs b/src/Apache.Arrow/Arrays/ArrowArrayFactory.cs
index 38092a7..8aaba2d 100644
--- a/src/Apache.Arrow/Arrays/ArrowArrayFactory.cs
+++ b/src/Apache.Arrow/Arrays/ArrowArrayFactory.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+using System;
using Apache.Arrow.Arrays;
using Apache.Arrow.Types;
-using System;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/BinaryArray.cs b/src/Apache.Arrow/Arrays/BinaryArray.cs
index bd5d931..feb4b89 100644
--- a/src/Apache.Arrow/Arrays/BinaryArray.cs
+++ b/src/Apache.Arrow/Arrays/BinaryArray.cs
@@ -13,12 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Apache.Arrow.Memory;
-using System.Collections;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/BinaryViewArray.cs b/src/Apache.Arrow/Arrays/BinaryViewArray.cs
index b7c9b07..f9c8c0e 100644
--- a/src/Apache.Arrow/Arrays/BinaryViewArray.cs
+++ b/src/Apache.Arrow/Arrays/BinaryViewArray.cs
@@ -13,13 +13,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
-using Apache.Arrow.Scalars;
-using Apache.Arrow.Types;
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
-using System.Collections;
+using Apache.Arrow.Memory;
+using Apache.Arrow.Scalars;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/BooleanArray.cs b/src/Apache.Arrow/Arrays/BooleanArray.cs
index 19d4d0b..f87c2ec 100644
--- a/src/Apache.Arrow/Arrays/BooleanArray.cs
+++ b/src/Apache.Arrow/Arrays/BooleanArray.cs
@@ -13,15 +13,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
-using Apache.Arrow.Types;
using System;
using System.Collections;
using System.Collections.Generic;
+using Apache.Arrow.Memory;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
- public class BooleanArray: Array, IReadOnlyList<bool?>, ICollection<bool?>
+ public class BooleanArray : Array, IReadOnlyList<bool?>, ICollection<bool?>
{
public class Builder : IArrowArrayBuilder<bool, BooleanArray, Builder>
{
@@ -162,7 +162,7 @@ namespace Apache.Arrow
}
public ArrowBuffer ValueBuffer => Data.Buffers[1];
- public ReadOnlySpan<byte> Values => ValueBuffer.Span.Slice(0, (int) Math.Ceiling(Length / 8.0));
+ public ReadOnlySpan<byte> Values => ValueBuffer.Span.Slice(0, (int)Math.Ceiling(Length / 8.0));
public BooleanArray(
ArrowBuffer valueBuffer, ArrowBuffer nullBitmapBuffer,
diff --git a/src/Apache.Arrow/Arrays/Date32Array.cs b/src/Apache.Arrow/Arrays/Date32Array.cs
index 55864e8..2fd5bfb 100644
--- a/src/Apache.Arrow/Arrays/Date32Array.cs
+++ b/src/Apache.Arrow/Arrays/Date32Array.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/Date64Array.cs b/src/Apache.Arrow/Arrays/Date64Array.cs
index bf53574..64d3cf5 100644
--- a/src/Apache.Arrow/Arrays/Date64Array.cs
+++ b/src/Apache.Arrow/Arrays/Date64Array.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/DenseUnionArray.cs b/src/Apache.Arrow/Arrays/DenseUnionArray.cs
index 79880c8..0b8234a 100644
--- a/src/Apache.Arrow/Arrays/DenseUnionArray.cs
+++ b/src/Apache.Arrow/Arrays/DenseUnionArray.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
@@ -41,7 +41,7 @@ namespace Apache.Arrow
ValidateMode(UnionMode.Dense, Type.Mode);
}
- public DenseUnionArray(ArrayData data)
+ public DenseUnionArray(ArrayData data)
: base(data)
{
ValidateMode(UnionMode.Dense, Type.Mode);
diff --git a/src/Apache.Arrow/Arrays/FixedSizeBinaryArray.cs b/src/Apache.Arrow/Arrays/FixedSizeBinaryArray.cs
index 9d597ef..3bb0652 100644
--- a/src/Apache.Arrow/Arrays/FixedSizeBinaryArray.cs
+++ b/src/Apache.Arrow/Arrays/FixedSizeBinaryArray.cs
@@ -136,7 +136,8 @@ namespace Apache.Arrow.Arrays
return Instance;
}
- public TBuilder Clear() {
+ public TBuilder Clear()
+ {
ValueBuffer.Clear();
ValidityBuffer.Clear();
@@ -146,7 +147,7 @@ namespace Apache.Arrow.Arrays
public TBuilder Append(byte[] value)
{
- if(value.Length % ByteWidth != 0)
+ if (value.Length % ByteWidth != 0)
throw new ArgumentOutOfRangeException("Bytes of length: " + value.Length + " do not conform to the fixed size: " + ByteWidth);
return Append(value.AsSpan());
}
diff --git a/src/Apache.Arrow/Arrays/HalfFloatArray.cs b/src/Apache.Arrow/Arrays/HalfFloatArray.cs
index 072629e..7ab869e 100644
--- a/src/Apache.Arrow/Arrays/HalfFloatArray.cs
+++ b/src/Apache.Arrow/Arrays/HalfFloatArray.cs
@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/Int16Array.cs b/src/Apache.Arrow/Arrays/Int16Array.cs
index 0401865..cb33a53 100644
--- a/src/Apache.Arrow/Arrays/Int16Array.cs
+++ b/src/Apache.Arrow/Arrays/Int16Array.cs
@@ -22,7 +22,7 @@ namespace Apache.Arrow
public class Builder : PrimitiveArrayBuilder<short, Int16Array, Builder>
{
protected override Int16Array Build(
- ArrowBuffer valueBuffer, ArrowBuffer nullBitmapBuffer,
+ ArrowBuffer valueBuffer, ArrowBuffer nullBitmapBuffer,
int length, int nullCount, int offset) =>
new Int16Array(valueBuffer, nullBitmapBuffer, length, nullCount, offset);
}
diff --git a/src/Apache.Arrow/Arrays/LargeBinaryArray.cs b/src/Apache.Arrow/Arrays/LargeBinaryArray.cs
index 9eddbed..1219466 100644
--- a/src/Apache.Arrow/Arrays/LargeBinaryArray.cs
+++ b/src/Apache.Arrow/Arrays/LargeBinaryArray.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
+using Apache.Arrow.Types;
namespace Apache.Arrow;
diff --git a/src/Apache.Arrow/Arrays/LargeStringArray.cs b/src/Apache.Arrow/Arrays/LargeStringArray.cs
index 2a65b82..e97683f 100644
--- a/src/Apache.Arrow/Arrays/LargeStringArray.cs
+++ b/src/Apache.Arrow/Arrays/LargeStringArray.cs
@@ -22,7 +22,7 @@ using Apache.Arrow.Types;
namespace Apache.Arrow;
-public class LargeStringArray: LargeBinaryArray, IReadOnlyList<string>, ICollection<string>
+public class LargeStringArray : LargeBinaryArray, IReadOnlyList<string>, ICollection<string>
{
public static readonly Encoding DefaultEncoding = StringArray.DefaultEncoding;
diff --git a/src/Apache.Arrow/Arrays/MapArray.cs b/src/Apache.Arrow/Arrays/MapArray.cs
index c1dc968..341bb24 100644
--- a/src/Apache.Arrow/Arrays/MapArray.cs
+++ b/src/Apache.Arrow/Arrays/MapArray.cs
@@ -165,7 +165,7 @@ namespace Apache.Arrow
}
}
- public IEnumerable<KeyValuePair<K,V>> GetKeyValuePairs<TKeyArray, K, TValueArray, V>(int index, Func<TKeyArray, int, K> getKey, Func<TValueArray, int, V> getValue)
+ public IEnumerable<KeyValuePair<K, V>> GetKeyValuePairs<TKeyArray, K, TValueArray, V>(int index, Func<TKeyArray, int, K> getKey, Func<TValueArray, int, V> getValue)
where TKeyArray : Array where TValueArray : Array
{
ReadOnlySpan<int> offsets = ValueOffsets;
@@ -178,7 +178,7 @@ namespace Apache.Arrow
for (int i = start; i < end; i++)
{
- yield return new KeyValuePair<K,V>(getKey(keyArray, i), getValue(valueArray, i));
+ yield return new KeyValuePair<K, V>(getKey(keyArray, i), getValue(valueArray, i));
}
}
}
diff --git a/src/Apache.Arrow/Arrays/NullArray.cs b/src/Apache.Arrow/Arrays/NullArray.cs
index 7f3e183..4b1c695 100644
--- a/src/Apache.Arrow/Arrays/NullArray.cs
+++ b/src/Apache.Arrow/Arrays/NullArray.cs
@@ -14,8 +14,8 @@
// limitations under the License.
using System;
-using Apache.Arrow.Types;
using Apache.Arrow.Memory;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs b/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs
index b358384..dc6fba2 100644
--- a/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs
+++ b/src/Apache.Arrow/Arrays/PrimitiveArrayBuilder.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Memory;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/SparseUnionArray.cs b/src/Apache.Arrow/Arrays/SparseUnionArray.cs
index 5b29489..5a28090 100644
--- a/src/Apache.Arrow/Arrays/SparseUnionArray.cs
+++ b/src/Apache.Arrow/Arrays/SparseUnionArray.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
@@ -35,7 +35,7 @@ namespace Apache.Arrow
ValidateMode(UnionMode.Sparse, Type.Mode);
}
- public SparseUnionArray(ArrayData data)
+ public SparseUnionArray(ArrayData data)
: base(data)
{
ValidateMode(UnionMode.Sparse, Type.Mode);
diff --git a/src/Apache.Arrow/Arrays/StringArray.cs b/src/Apache.Arrow/Arrays/StringArray.cs
index ab44805..6df1011 100644
--- a/src/Apache.Arrow/Arrays/StringArray.cs
+++ b/src/Apache.Arrow/Arrays/StringArray.cs
@@ -22,7 +22,7 @@ using Apache.Arrow.Types;
namespace Apache.Arrow
{
- public class StringArray: BinaryArray, IReadOnlyList<string>, ICollection<string>
+ public class StringArray : BinaryArray, IReadOnlyList<string>, ICollection<string>
{
public static readonly Encoding DefaultEncoding = Encoding.UTF8;
diff --git a/src/Apache.Arrow/Arrays/StringViewArray.cs b/src/Apache.Arrow/Arrays/StringViewArray.cs
index 8864476..96eeb19 100644
--- a/src/Apache.Arrow/Arrays/StringViewArray.cs
+++ b/src/Apache.Arrow/Arrays/StringViewArray.cs
@@ -13,16 +13,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
- public class StringViewArray: BinaryViewArray, IReadOnlyList<string>
+ public class StringViewArray : BinaryViewArray, IReadOnlyList<string>
{
public static readonly Encoding DefaultEncoding = Encoding.UTF8;
diff --git a/src/Apache.Arrow/Arrays/StructArray.cs b/src/Apache.Arrow/Arrays/StructArray.cs
index fc1335a..1f0c8e1 100644
--- a/src/Apache.Arrow/Arrays/StructArray.cs
+++ b/src/Apache.Arrow/Arrays/StructArray.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/Time32Array.cs b/src/Apache.Arrow/Arrays/Time32Array.cs
index 63c0898..e546d0f 100644
--- a/src/Apache.Arrow/Arrays/Time32Array.cs
+++ b/src/Apache.Arrow/Arrays/Time32Array.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.IO;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
@@ -104,7 +104,7 @@ namespace Apache.Arrow
return null;
}
- var unit = ((Time32Type) Data.DataType).Unit;
+ var unit = ((Time32Type)Data.DataType).Unit;
return unit switch
{
TimeUnit.Second => value,
diff --git a/src/Apache.Arrow/Arrays/Time64Array.cs b/src/Apache.Arrow/Arrays/Time64Array.cs
index 5518462..557cc86 100644
--- a/src/Apache.Arrow/Arrays/Time64Array.cs
+++ b/src/Apache.Arrow/Arrays/Time64Array.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.IO;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Arrays/TimestampArray.cs b/src/Apache.Arrow/Arrays/TimestampArray.cs
index b838605..ffc6471 100644
--- a/src/Apache.Arrow/Arrays/TimestampArray.cs
+++ b/src/Apache.Arrow/Arrays/TimestampArray.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
@@ -25,7 +25,7 @@ namespace Apache.Arrow
{
private static readonly DateTimeOffset s_epoch = new DateTimeOffset(1970, 1, 1, 0, 0, 0, 0, TimeSpan.Zero);
- public class Builder: PrimitiveArrayBuilder<DateTimeOffset, long, TimestampArray, Builder>
+ public class Builder : PrimitiveArrayBuilder<DateTimeOffset, long, TimestampArray, Builder>
{
internal class TimestampBuilder : PrimitiveArrayBuilder<long, TimestampArray, TimestampBuilder>
{
@@ -55,7 +55,7 @@ namespace Apache.Arrow
: this(new TimestampType(unit, timezone)) { }
public Builder(TimeUnit unit)
- : this(new TimestampType(unit, (string) null)) { }
+ : this(new TimestampType(unit, (string)null)) { }
public Builder(TimestampType type)
: base(new TimestampBuilder(type))
@@ -95,7 +95,8 @@ namespace Apache.Arrow
ArrowBuffer valueBuffer, ArrowBuffer nullBitmapBuffer,
int length, int nullCount, int offset)
: this(new ArrayData(type, length, nullCount, offset,
- new[] {nullBitmapBuffer, valueBuffer})) { }
+ new[] { nullBitmapBuffer, valueBuffer }))
+ { }
public TimestampArray(ArrayData data)
: base(data)
@@ -109,7 +110,7 @@ namespace Apache.Arrow
public DateTimeOffset GetTimestampUnchecked(int index)
{
- var type = (TimestampType) Data.DataType;
+ var type = (TimestampType)Data.DataType;
long value = Values[index];
long ticks;
diff --git a/src/Apache.Arrow/Arrays/UInt8Array.cs b/src/Apache.Arrow/Arrays/UInt8Array.cs
index 5cde791..f68a5fa 100644
--- a/src/Apache.Arrow/Arrays/UInt8Array.cs
+++ b/src/Apache.Arrow/Arrays/UInt8Array.cs
@@ -30,8 +30,9 @@ namespace Apache.Arrow
public UInt8Array(
ArrowBuffer valueBuffer, ArrowBuffer nullBitmapBuffer,
int length, int nullCount, int offset)
- : this(new ArrayData(UInt8Type.Default, length, nullCount, offset,
- new[] { nullBitmapBuffer, valueBuffer })) { }
+ : this(new ArrayData(UInt8Type.Default, length, nullCount, offset,
+ new[] { nullBitmapBuffer, valueBuffer }))
+ { }
public UInt8Array(ArrayData data)
: base(data)
diff --git a/src/Apache.Arrow/Arrays/UnionArray.cs b/src/Apache.Arrow/Arrays/UnionArray.cs
index c1deb9b..ccaa88d 100644
--- a/src/Apache.Arrow/Arrays/UnionArray.cs
+++ b/src/Apache.Arrow/Arrays/UnionArray.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Threading;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
@@ -47,7 +47,7 @@ namespace Apache.Arrow
public bool IsNull(int index) => !IsValid(index);
- protected UnionArray(ArrayData data)
+ protected UnionArray(ArrayData data)
{
Data = data;
data.EnsureDataType(ArrowTypeId.Union);
diff --git a/src/Apache.Arrow/ArrowBuffer.BitmapBuilder.cs b/src/Apache.Arrow/ArrowBuffer.BitmapBuilder.cs
index 6bdd131..cb1b240 100644
--- a/src/Apache.Arrow/ArrowBuffer.BitmapBuilder.cs
+++ b/src/Apache.Arrow/ArrowBuffer.BitmapBuilder.cs
@@ -96,16 +96,16 @@ namespace Apache.Arrow
/// <param name="validBits">Number of valid bits in the source span.</param>
/// <returns>Returns the builder (for fluent-style composition).</returns>
public BitmapBuilder Append(ReadOnlySpan<byte> source, int validBits)
- {
+ {
if (!source.IsEmpty && validBits > source.Length * 8)
throw new ArgumentException($"Number of valid bits ({validBits}) cannot be greater than the source span length ({source.Length * 8} bits).", nameof(validBits));
-
+
// Check if memory copy can be used from the source array (performance optimization for byte-aligned coping)
if (!source.IsEmpty && Length % 8 == 0)
{
EnsureAdditionalCapacity(validBits);
source.Slice(0, BitUtility.ByteCount(validBits)).CopyTo(Span.Slice(Length / 8));
-
+
Length += validBits;
SetBitCount += BitUtility.CountBits(source, 0, validBits);
}
diff --git a/src/Apache.Arrow/ArrowBuffer.Builder.cs b/src/Apache.Arrow/ArrowBuffer.Builder.cs
index 7c03027..fad6ab7 100644
--- a/src/Apache.Arrow/ArrowBuffer.Builder.cs
+++ b/src/Apache.Arrow/ArrowBuffer.Builder.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
+using Apache.Arrow.Memory;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/BitUtility.cs b/src/Apache.Arrow/BitUtility.cs
index d9ad2e6..cf32a45 100644
--- a/src/Apache.Arrow/BitUtility.cs
+++ b/src/Apache.Arrow/BitUtility.cs
@@ -45,7 +45,7 @@ namespace Apache.Arrow
public static void ClearBit(Span<byte> data, int index)
{
- data[index / 8] &= (byte) ~BitMask[index % 8];
+ data[index / 8] &= (byte)~BitMask[index % 8];
}
public static void SetBit(Span<byte> data, int index)
@@ -75,7 +75,7 @@ namespace Apache.Arrow
return;
int endBitIndex = checked(index + length - 1);
-
+
// Use simpler method if there aren't many values
if (length < 20)
{
@@ -85,13 +85,13 @@ namespace Apache.Arrow
}
return;
}
-
+
// Otherwise do the work to figure out how to copy whole bytes
int startByteIndex = index / 8;
int startBitOffset = index % 8;
int endByteIndex = endBitIndex / 8;
int endBitOffset = endBitIndex % 8;
-
+
// If the starting index and ending index are not byte-aligned,
// we'll need to set bits the slow way. If they are
// byte-aligned, and for all other bytes in the 'middle', we
diff --git a/src/Apache.Arrow/C/CArrowArrayExporter.cs b/src/Apache.Arrow/C/CArrowArrayExporter.cs
index b241fdf..d81a67b 100644
--- a/src/Apache.Arrow/C/CArrowArrayExporter.cs
+++ b/src/Apache.Arrow/C/CArrowArrayExporter.cs
@@ -239,7 +239,7 @@ namespace Apache.Arrow.C
private unsafe static void DisposePrivateData(void** ptr)
{
- GCHandle gch = GCHandle.FromIntPtr((IntPtr) (*ptr));
+ GCHandle gch = GCHandle.FromIntPtr((IntPtr)(*ptr));
if (!gch.IsAllocated)
{
return;
@@ -247,7 +247,7 @@ namespace Apache.Arrow.C
// We can't call IDisposable.Dispose() here as we create multiple
// GCHandles to the same object. Instead, refcounting ensures
// timely memory deallocation when all GCHandles are freed.
- ((ExportedAllocationOwner) gch.Target).DecRef();
+ ((ExportedAllocationOwner)gch.Target).DecRef();
gch.Free();
}
}
diff --git a/src/Apache.Arrow/ChunkedArray.cs b/src/Apache.Arrow/ChunkedArray.cs
index 85b3560..2c238ac 100644
--- a/src/Apache.Arrow/ChunkedArray.cs
+++ b/src/Apache.Arrow/ChunkedArray.cs
@@ -93,7 +93,7 @@ namespace Apache.Arrow
}
public override string ToString() => $"{nameof(ChunkedArray)}: Length={Length}, DataType={DataType.Name}";
-
+
private static IArrowArray[] Cast(IList<Array> arrays)
{
IArrowArray[] arrowArrays = new IArrowArray[arrays.Count];
diff --git a/src/Apache.Arrow/Column.cs b/src/Apache.Arrow/Column.cs
index 0709b91..03be51c 100644
--- a/src/Apache.Arrow/Column.cs
+++ b/src/Apache.Arrow/Column.cs
@@ -24,7 +24,7 @@ namespace Apache.Arrow
/// </summary>
public class Column
{
- public Field Field { get; }
+ public Field Field { get; }
public ChunkedArray Data { get; }
public Column(Field field, IList<Array> arrays)
diff --git a/src/Apache.Arrow/DecimalUtility.cs b/src/Apache.Arrow/DecimalUtility.cs
index 363f816..c4e7256 100644
--- a/src/Apache.Arrow/DecimalUtility.cs
+++ b/src/Apache.Arrow/DecimalUtility.cs
@@ -57,7 +57,7 @@ namespace Apache.Arrow
{
throw new OverflowException($"Value: {integerPart} of {integerValue} is too big be represented as a decimal");
}
- else if (integerPart < _minDecimal)
+ else if (integerPart < _minDecimal)
{
throw new OverflowException($"Value: {integerPart} of {integerValue} is too small be represented as a decimal");
}
diff --git a/src/Apache.Arrow/Extensions/ArrayDataExtensions.cs b/src/Apache.Arrow/Extensions/ArrayDataExtensions.cs
index 2b6742a..84936a1 100644
--- a/src/Apache.Arrow/Extensions/ArrayDataExtensions.cs
+++ b/src/Apache.Arrow/Extensions/ArrayDataExtensions.cs
@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Extensions/ArrowTypeExtensions.cs b/src/Apache.Arrow/Extensions/ArrowTypeExtensions.cs
index 5b04074..e2ce25e 100644
--- a/src/Apache.Arrow/Extensions/ArrowTypeExtensions.cs
+++ b/src/Apache.Arrow/Extensions/ArrowTypeExtensions.cs
@@ -20,7 +20,7 @@ namespace Apache.Arrow
{
public static class ArrowTypeExtensions
{
- private static readonly ISet<ArrowTypeId> s_integralTypes =
+ private static readonly ISet<ArrowTypeId> s_integralTypes =
new HashSet<ArrowTypeId>(new[]
{
ArrowTypeId.Int8, ArrowTypeId.Int16, ArrowTypeId.Int32, ArrowTypeId.Int64,
@@ -33,7 +33,7 @@ namespace Apache.Arrow
ArrowTypeId.HalfFloat, ArrowTypeId.Float, ArrowTypeId.Double
});
- public static bool IsIntegral(this IArrowType type)
+ public static bool IsIntegral(this IArrowType type)
=> s_integralTypes.Contains(type.TypeId);
public static bool IsFloatingPoint(this IArrowType type)
diff --git a/src/Apache.Arrow/Extensions/SpanExtensions.cs b/src/Apache.Arrow/Extensions/SpanExtensions.cs
index b759f38..1e99481 100644
--- a/src/Apache.Arrow/Extensions/SpanExtensions.cs
+++ b/src/Apache.Arrow/Extensions/SpanExtensions.cs
@@ -21,11 +21,11 @@ namespace Apache.Arrow
public static class SpanExtensions
{
public static Span<T> CastTo<T>(this Span<byte> span)
- where T: struct =>
+ where T : struct =>
MemoryMarshal.Cast<byte, T>(span);
public static ReadOnlySpan<T> CastTo<T>(this ReadOnlySpan<byte> span)
- where T: struct =>
+ where T : struct =>
MemoryMarshal.Cast<byte, T>(span);
}
}
diff --git a/src/Apache.Arrow/Extensions/StreamExtensions.cs b/src/Apache.Arrow/Extensions/StreamExtensions.cs
index 1767d23..032cad2 100644
--- a/src/Apache.Arrow/Extensions/StreamExtensions.cs
+++ b/src/Apache.Arrow/Extensions/StreamExtensions.cs
@@ -27,7 +27,7 @@ namespace Apache.Arrow
int totalBytesRead = 0;
do
{
- int bytesRead =
+ int bytesRead =
await stream.ReadAsync(
buffer.Slice(totalBytesRead, buffer.Length - totalBytesRead),
cancellationToken)
diff --git a/src/Apache.Arrow/Field.Builder.cs b/src/Apache.Arrow/Field.Builder.cs
index f7f3338..08513ec 100644
--- a/src/Apache.Arrow/Field.Builder.cs
+++ b/src/Apache.Arrow/Field.Builder.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Interfaces/IArrowArrayBuilder.cs b/src/Apache.Arrow/Interfaces/IArrowArrayBuilder.cs
index b18ff45..6248866 100644
--- a/src/Apache.Arrow/Interfaces/IArrowArrayBuilder.cs
+++ b/src/Apache.Arrow/Interfaces/IArrowArrayBuilder.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System;
using System.Collections.Generic;
+using Apache.Arrow.Memory;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Interfaces/IArrowArrayVisitor.cs b/src/Apache.Arrow/Interfaces/IArrowArrayVisitor.cs
index c93bbb4..017cc97 100644
--- a/src/Apache.Arrow/Interfaces/IArrowArrayVisitor.cs
+++ b/src/Apache.Arrow/Interfaces/IArrowArrayVisitor.cs
@@ -22,8 +22,8 @@ namespace Apache.Arrow
void Visit(IArrowArray array);
}
- public interface IArrowArrayVisitor<T>: IArrowArrayVisitor
- where T: IArrowArray
+ public interface IArrowArrayVisitor<T> : IArrowArrayVisitor
+ where T : IArrowArray
{
void Visit(T array);
}
diff --git a/src/Apache.Arrow/Ipc/ArrowFileReader.cs b/src/Apache.Arrow/Ipc/ArrowFileReader.cs
index 935a1e7..29677ed 100644
--- a/src/Apache.Arrow/Ipc/ArrowFileReader.cs
+++ b/src/Apache.Arrow/Ipc/ArrowFileReader.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Apache.Arrow.Memory;
namespace Apache.Arrow.Ipc
{
diff --git a/src/Apache.Arrow/Ipc/ArrowFileReaderImplementation.cs b/src/Apache.Arrow/Ipc/ArrowFileReaderImplementation.cs
index 4b7c5f9..8cedea6 100644
--- a/src/Apache.Arrow/Ipc/ArrowFileReaderImplementation.cs
+++ b/src/Apache.Arrow/Ipc/ArrowFileReaderImplementation.cs
@@ -13,13 +13,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System;
using System.Buffers;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using Apache.Arrow.Memory;
namespace Apache.Arrow.Ipc
{
diff --git a/src/Apache.Arrow/Ipc/ArrowMemoryReaderImplementation.cs b/src/Apache.Arrow/Ipc/ArrowMemoryReaderImplementation.cs
index 842c568..1a799b0 100644
--- a/src/Apache.Arrow/Ipc/ArrowMemoryReaderImplementation.cs
+++ b/src/Apache.Arrow/Ipc/ArrowMemoryReaderImplementation.cs
@@ -13,13 +13,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Flatbuf;
-using Google.FlatBuffers;
using System;
using System.Buffers.Binary;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Apache.Arrow.Flatbuf;
+using Google.FlatBuffers;
namespace Apache.Arrow.Ipc
{
diff --git a/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs b/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs
index 7e76667..d71478a 100644
--- a/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs
+++ b/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs
@@ -21,8 +21,8 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Apache.Arrow.Flatbuf;
-using Apache.Arrow.Types;
using Apache.Arrow.Memory;
+using Apache.Arrow.Types;
using Google.FlatBuffers;
using Type = System.Type;
diff --git a/src/Apache.Arrow/Ipc/ArrowStreamReader.cs b/src/Apache.Arrow/Ipc/ArrowStreamReader.cs
index e129da3..dc342b2 100644
--- a/src/Apache.Arrow/Ipc/ArrowStreamReader.cs
+++ b/src/Apache.Arrow/Ipc/ArrowStreamReader.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Apache.Arrow.Memory;
namespace Apache.Arrow.Ipc
{
diff --git a/src/Apache.Arrow/Ipc/ArrowStreamReaderImplementation.cs b/src/Apache.Arrow/Ipc/ArrowStreamReaderImplementation.cs
index 23a14d8..e2bfe4a 100644
--- a/src/Apache.Arrow/Ipc/ArrowStreamReaderImplementation.cs
+++ b/src/Apache.Arrow/Ipc/ArrowStreamReaderImplementation.cs
@@ -13,12 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
using System;
using System.Buffers;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Apache.Arrow.Memory;
namespace Apache.Arrow.Ipc
{
diff --git a/src/Apache.Arrow/Ipc/ArrowStreamWriter.cs b/src/Apache.Arrow/Ipc/ArrowStreamWriter.cs
index f317093..5f180c4 100644
--- a/src/Apache.Arrow/Ipc/ArrowStreamWriter.cs
+++ b/src/Apache.Arrow/Ipc/ArrowStreamWriter.cs
@@ -528,7 +528,7 @@ namespace Apache.Arrow.Ipc
return CreateBuffer(buffer.Memory, null);
}
- private Buffer CreateBuffer(IMemoryOwner<byte> bufferOwner)
+ private Buffer CreateBuffer(IMemoryOwner<byte> bufferOwner)
{
return CreateBuffer(bufferOwner.Memory, bufferOwner);
}
@@ -539,7 +539,7 @@ namespace Apache.Arrow.Ipc
const int UncompressedLengthSize = 8;
ReadOnlyMemory<byte> bufferToWrite;
- IMemoryOwner<byte> bufferOwner=null;
+ IMemoryOwner<byte> bufferOwner = null;
if (_compressionCodec == null)
{
bufferToWrite = buffer;
@@ -560,11 +560,11 @@ namespace Apache.Arrow.Ipc
int newBufferLength = UncompressedLengthSize + buffer.Length;
bufferOwner = _allocator.Allocate(newBufferLength);
- if(TryCompress(buffer, bufferOwner.Memory.Slice(UncompressedLengthSize, buffer.Length), out int bytesWritten))
+ if (TryCompress(buffer, bufferOwner.Memory.Slice(UncompressedLengthSize, buffer.Length), out int bytesWritten))
{
// Write the uncompressed length to the start of the buffer
BinaryPrimitives.WriteInt64LittleEndian(bufferOwner.Memory.Span, buffer.Length);
- bufferToWrite = bufferOwner.Memory.Slice(0, bytesWritten+UncompressedLengthSize);
+ bufferToWrite = bufferOwner.Memory.Slice(0, bytesWritten + UncompressedLengthSize);
}
else
{
@@ -587,7 +587,7 @@ namespace Apache.Arrow.Ipc
private bool TryCompress(ReadOnlyMemory<byte> source, Memory<byte> destination, out int bytesWritten)
{
- if(_compressionCodec is ITryCompressionCodec tryCompressionCodec)
+ if (_compressionCodec is ITryCompressionCodec tryCompressionCodec)
return tryCompressionCodec.TryCompress(source, destination, out bytesWritten);
// Fallback to using a memory stream for compression
_fallbackCompressionStream.Seek(0, SeekOrigin.Begin);
diff --git a/src/Apache.Arrow/Ipc/ArrowTypeFlatbufferBuilder.cs b/src/Apache.Arrow/Ipc/ArrowTypeFlatbufferBuilder.cs
index d1fb921..503680a 100644
--- a/src/Apache.Arrow/Ipc/ArrowTypeFlatbufferBuilder.cs
+++ b/src/Apache.Arrow/Ipc/ArrowTypeFlatbufferBuilder.cs
@@ -320,7 +320,7 @@ namespace Apache.Arrow.Ipc
// type in the DictionaryEncoding metadata in the parent field
type.ValueType.Accept(this);
}
-
+
public void Visit(FixedSizeBinaryType type)
{
Result = FieldType.Build(
diff --git a/src/Apache.Arrow/Ipc/DictionaryMemo.cs b/src/Apache.Arrow/Ipc/DictionaryMemo.cs
index b107cc6..680642d 100644
--- a/src/Apache.Arrow/Ipc/DictionaryMemo.cs
+++ b/src/Apache.Arrow/Ipc/DictionaryMemo.cs
@@ -110,7 +110,7 @@ namespace Apache.Arrow.Ipc
public void AddDeltaDictionary(long id, IArrowArray deltaDictionary, MemoryAllocator allocator = default)
{
IArrowArray currentDictionary = _idToDictionary[id];
- IArrowArray dictionary = ArrowArrayConcatenator.Concatenate(new List<IArrowArray>{ currentDictionary, deltaDictionary }, allocator);
+ IArrowArray dictionary = ArrowArrayConcatenator.Concatenate(new List<IArrowArray> { currentDictionary, deltaDictionary }, allocator);
AddOrReplaceDictionary(id, dictionary);
}
}
diff --git a/src/Apache.Arrow/Ipc/ReadOnlyMemoryBufferAllocator.cs b/src/Apache.Arrow/Ipc/ReadOnlyMemoryBufferAllocator.cs
index 0f96873..3176366 100644
--- a/src/Apache.Arrow/Ipc/ReadOnlyMemoryBufferAllocator.cs
+++ b/src/Apache.Arrow/Ipc/ReadOnlyMemoryBufferAllocator.cs
@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Google.FlatBuffers;
using System;
+using Google.FlatBuffers;
namespace Apache.Arrow.Ipc
{
diff --git a/src/Apache.Arrow/Memory/ExportedAllocationOwner.cs b/src/Apache.Arrow/Memory/ExportedAllocationOwner.cs
index 8084cd2..516e7d7 100644
--- a/src/Apache.Arrow/Memory/ExportedAllocationOwner.cs
+++ b/src/Apache.Arrow/Memory/ExportedAllocationOwner.cs
@@ -14,8 +14,8 @@
// limitations under the License.
using System;
-using System.Diagnostics;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
diff --git a/src/Apache.Arrow/Memory/NativeMemoryAllocator.cs b/src/Apache.Arrow/Memory/NativeMemoryAllocator.cs
index 57f8551..fc4e642 100644
--- a/src/Apache.Arrow/Memory/NativeMemoryAllocator.cs
+++ b/src/Apache.Arrow/Memory/NativeMemoryAllocator.cs
@@ -23,7 +23,7 @@ namespace Apache.Arrow.Memory
{
internal static readonly INativeAllocationOwner ExclusiveOwner = new NativeAllocationOwner();
- public NativeMemoryAllocator(int alignment = DefaultAlignment)
+ public NativeMemoryAllocator(int alignment = DefaultAlignment)
: base(alignment) { }
protected override IMemoryOwner<byte> AllocateInternal(int length, out int bytesAllocated)
@@ -36,7 +36,7 @@ namespace Apache.Arrow.Memory
// TODO: Should the allocation be moved to NativeMemory?
int size = length + Alignment;
- IntPtr ptr = Marshal.AllocHGlobal(size);
+ IntPtr ptr = Marshal.AllocHGlobal(size);
int offset = (int)(Alignment - (ptr.ToInt64() & (Alignment - 1)));
var manager = new NativeMemoryManager(ptr, offset, length);
diff --git a/src/Apache.Arrow/Memory/NullMemoryOwner.cs b/src/Apache.Arrow/Memory/NullMemoryOwner.cs
index 7415ffc..390a44a 100644
--- a/src/Apache.Arrow/Memory/NullMemoryOwner.cs
+++ b/src/Apache.Arrow/Memory/NullMemoryOwner.cs
@@ -26,4 +26,4 @@ namespace Apache.Arrow.Memory
{
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Apache.Arrow/RecordBatch.Builder.cs b/src/Apache.Arrow/RecordBatch.Builder.cs
index e9a84a4..0e881f0 100644
--- a/src/Apache.Arrow/RecordBatch.Builder.cs
+++ b/src/Apache.Arrow/RecordBatch.Builder.cs
@@ -13,12 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Memory;
-using Apache.Arrow.Types;
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Memory;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
@@ -82,8 +82,8 @@ namespace Apache.Arrow
new TimestampArray.Builder(new TimestampType(unit, timezone)), action);
private TArray Build<TArray, TArrayBuilder>(TArrayBuilder builder, Action<TArrayBuilder> action)
- where TArray: IArrowArray
- where TArrayBuilder: IArrowArrayBuilder<TArray>
+ where TArray : IArrowArray
+ where TArrayBuilder : IArrowArrayBuilder<TArray>
{
if (action == null)
{
@@ -147,7 +147,7 @@ namespace Apache.Arrow
}
public Builder Append<TArray>(string name, bool nullable, IArrowArrayBuilder<TArray> builder)
- where TArray: IArrowArray
+ where TArray : IArrowArray
{
return builder == null
? this
@@ -155,7 +155,7 @@ namespace Apache.Arrow
}
public Builder Append<TArray>(string name, bool nullable, TArray array)
- where TArray: IArrowArray
+ where TArray : IArrowArray
{
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentNullException(nameof(name));
if (array == null) return this;
@@ -171,7 +171,7 @@ namespace Apache.Arrow
}
public Builder Append<TArray>(string name, bool nullable, Func<ArrayBuilder, TArray> action)
- where TArray: IArrowArray
+ where TArray : IArrowArray
{
if (action == null) return this;
diff --git a/src/Apache.Arrow/Schema.cs b/src/Apache.Arrow/Schema.cs
index 32615e5..04e0e83 100644
--- a/src/Apache.Arrow/Schema.cs
+++ b/src/Apache.Arrow/Schema.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using Apache.Arrow.Types;
namespace Apache.Arrow
{
diff --git a/src/Apache.Arrow/Types/ArrowType.cs b/src/Apache.Arrow/Types/ArrowType.cs
index c0eca23..e548cf0 100644
--- a/src/Apache.Arrow/Types/ArrowType.cs
+++ b/src/Apache.Arrow/Types/ArrowType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public abstract class ArrowType: IArrowType
+ public abstract class ArrowType : IArrowType
{
public abstract ArrowTypeId TypeId { get; }
@@ -27,7 +27,7 @@ namespace Apache.Arrow.Types
public abstract void Accept(IArrowTypeVisitor visitor);
internal static void Accept<T>(T type, IArrowTypeVisitor visitor)
- where T: class, IArrowType
+ where T : class, IArrowType
{
switch (visitor)
{
diff --git a/src/Apache.Arrow/Types/BinaryType.cs b/src/Apache.Arrow/Types/BinaryType.cs
index 6734d93..74ae61d 100644
--- a/src/Apache.Arrow/Types/BinaryType.cs
+++ b/src/Apache.Arrow/Types/BinaryType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public class BinaryType: ArrowType
+ public class BinaryType : ArrowType
{
public static readonly BinaryType Default = new BinaryType();
diff --git a/src/Apache.Arrow/Types/BinaryViewType.cs b/src/Apache.Arrow/Types/BinaryViewType.cs
index f5cfc03..8035812 100644
--- a/src/Apache.Arrow/Types/BinaryViewType.cs
+++ b/src/Apache.Arrow/Types/BinaryViewType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public class BinaryViewType: ArrowType
+ public class BinaryViewType : ArrowType
{
public static readonly BinaryViewType Default = new BinaryViewType();
diff --git a/src/Apache.Arrow/Types/BooleanType.cs b/src/Apache.Arrow/Types/BooleanType.cs
index 3b57414..2ca1d0e 100644
--- a/src/Apache.Arrow/Types/BooleanType.cs
+++ b/src/Apache.Arrow/Types/BooleanType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public sealed class BooleanType: NumberType
+ public sealed class BooleanType : NumberType
{
public static readonly BooleanType Default = new BooleanType();
diff --git a/src/Apache.Arrow/Types/Date32Type.cs b/src/Apache.Arrow/Types/Date32Type.cs
index 9673bf6..0eeeef3 100644
--- a/src/Apache.Arrow/Types/Date32Type.cs
+++ b/src/Apache.Arrow/Types/Date32Type.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public sealed class Date32Type: DateType
+ public sealed class Date32Type : DateType
{
public static readonly Date32Type Default = new Date32Type();
diff --git a/src/Apache.Arrow/Types/DateType.cs b/src/Apache.Arrow/Types/DateType.cs
index 8f15b08..d2e708b 100644
--- a/src/Apache.Arrow/Types/DateType.cs
+++ b/src/Apache.Arrow/Types/DateType.cs
@@ -22,7 +22,7 @@ namespace Apache.Arrow.Types
Milliseconds = 1
}
- public abstract class DateType: FixedWidthType
+ public abstract class DateType : FixedWidthType
{
public abstract DateUnit Unit { get; }
}
diff --git a/src/Apache.Arrow/Types/Decimal256Type.cs b/src/Apache.Arrow/Types/Decimal256Type.cs
index b184deb..707feb6 100644
--- a/src/Apache.Arrow/Types/Decimal256Type.cs
+++ b/src/Apache.Arrow/Types/Decimal256Type.cs
@@ -15,7 +15,7 @@
namespace Apache.Arrow.Types
{
- public sealed class Decimal256Type: FixedSizeBinaryType
+ public sealed class Decimal256Type : FixedSizeBinaryType
{
public override ArrowTypeId TypeId => ArrowTypeId.Decimal256;
public override string Name => "decimal256";
diff --git a/src/Apache.Arrow/Types/DoubleType.cs b/src/Apache.Arrow/Types/DoubleType.cs
index aa6ade6..a9cc79f 100644
--- a/src/Apache.Arrow/Types/DoubleType.cs
+++ b/src/Apache.Arrow/Types/DoubleType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public sealed class DoubleType: FloatingPointType
+ public sealed class DoubleType : FloatingPointType
{
public static readonly DoubleType Default = new DoubleType();
diff --git a/src/Apache.Arrow/Types/FixedWidthType.cs b/src/Apache.Arrow/Types/FixedWidthType.cs
index d1c9e8c..9bd9797 100644
--- a/src/Apache.Arrow/Types/FixedWidthType.cs
+++ b/src/Apache.Arrow/Types/FixedWidthType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public abstract class FixedWidthType: ArrowType
+ public abstract class FixedWidthType : ArrowType
{
public override bool IsFixedWidth => true;
diff --git a/src/Apache.Arrow/Types/FloatType.cs b/src/Apache.Arrow/Types/FloatType.cs
index a3f7b39..d843636 100644
--- a/src/Apache.Arrow/Types/FloatType.cs
+++ b/src/Apache.Arrow/Types/FloatType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public sealed class FloatType: FloatingPointType
+ public sealed class FloatType : FloatingPointType
{
public static readonly FloatType Default = new FloatType();
diff --git a/src/Apache.Arrow/Types/FloatingPointType.cs b/src/Apache.Arrow/Types/FloatingPointType.cs
index 9fbe43a..f83d8ed 100644
--- a/src/Apache.Arrow/Types/FloatingPointType.cs
+++ b/src/Apache.Arrow/Types/FloatingPointType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public abstract class FloatingPointType: NumberType
+ public abstract class FloatingPointType : NumberType
{
public enum PrecisionKind
{
diff --git a/src/Apache.Arrow/Types/HalfFloatType.cs b/src/Apache.Arrow/Types/HalfFloatType.cs
index 5bfa232..ef43196 100644
--- a/src/Apache.Arrow/Types/HalfFloatType.cs
+++ b/src/Apache.Arrow/Types/HalfFloatType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public sealed class HalfFloatType: FloatingPointType
+ public sealed class HalfFloatType : FloatingPointType
{
public static readonly HalfFloatType Default = new HalfFloatType();
diff --git a/src/Apache.Arrow/Types/IArrowType.cs b/src/Apache.Arrow/Types/IArrowType.cs
index 6020fd4..657b234 100644
--- a/src/Apache.Arrow/Types/IArrowType.cs
+++ b/src/Apache.Arrow/Types/IArrowType.cs
@@ -65,10 +65,10 @@ namespace Apache.Arrow.Types
ArrowTypeId TypeId { get; }
string Name { get; }
-
+
void Accept(IArrowTypeVisitor visitor);
bool IsFixedWidth { get; }
-
+
}
}
diff --git a/src/Apache.Arrow/Types/IArrowTypeVisitor.cs b/src/Apache.Arrow/Types/IArrowTypeVisitor.cs
index ce5b114..9f1c885 100644
--- a/src/Apache.Arrow/Types/IArrowTypeVisitor.cs
+++ b/src/Apache.Arrow/Types/IArrowTypeVisitor.cs
@@ -21,8 +21,8 @@ namespace Apache.Arrow.Types
void Visit(IArrowType type);
}
- public interface IArrowTypeVisitor<in T>: IArrowTypeVisitor
- where T: IArrowType
+ public interface IArrowTypeVisitor<in T> : IArrowTypeVisitor
+ where T : IArrowType
{
void Visit(T type);
}
diff --git a/src/Apache.Arrow/Types/IntegerType.cs b/src/Apache.Arrow/Types/IntegerType.cs
index 7a5057c..06ff55f 100644
--- a/src/Apache.Arrow/Types/IntegerType.cs
+++ b/src/Apache.Arrow/Types/IntegerType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public abstract class IntegerType: NumberType
+ public abstract class IntegerType : NumberType
{
}
}
diff --git a/src/Apache.Arrow/Types/LargeBinaryType.cs b/src/Apache.Arrow/Types/LargeBinaryType.cs
index e22c333..a513065 100644
--- a/src/Apache.Arrow/Types/LargeBinaryType.cs
+++ b/src/Apache.Arrow/Types/LargeBinaryType.cs
@@ -15,7 +15,7 @@
namespace Apache.Arrow.Types;
-public class LargeBinaryType: ArrowType
+public class LargeBinaryType : ArrowType
{
public static readonly LargeBinaryType Default = new LargeBinaryType();
diff --git a/src/Apache.Arrow/Types/NumberType.cs b/src/Apache.Arrow/Types/NumberType.cs
index 04d21bc..7a49a6b 100644
--- a/src/Apache.Arrow/Types/NumberType.cs
+++ b/src/Apache.Arrow/Types/NumberType.cs
@@ -16,7 +16,7 @@
namespace Apache.Arrow.Types
{
- public abstract class NumberType: FixedWidthType
+ public abstract class NumberType : FixedWidthType
{
public abstract bool IsSigned { get; }
}
diff --git a/src/Apache.Arrow/Types/TimeUnit.cs b/src/Apache.Arrow/Types/TimeUnit.cs
index ba60fa9..c97ca28 100644
--- a/src/Apache.Arrow/Types/TimeUnit.cs
+++ b/src/Apache.Arrow/Types/TimeUnit.cs
@@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using System.IO;
using System;
+using System.IO;
namespace Apache.Arrow.Types
{
diff --git a/test/Apache.Arrow.Benchmarks/ArrowReaderBenchmark.cs b/test/Apache.Arrow.Benchmarks/ArrowReaderBenchmark.cs
index cd8198d..3760d94 100644
--- a/test/Apache.Arrow.Benchmarks/ArrowReaderBenchmark.cs
+++ b/test/Apache.Arrow.Benchmarks/ArrowReaderBenchmark.cs
@@ -13,15 +13,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+using System;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
using Apache.Arrow.Ipc;
using Apache.Arrow.Memory;
using Apache.Arrow.Tests;
using Apache.Arrow.Types;
using BenchmarkDotNet.Attributes;
-using System;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
namespace Apache.Arrow.Benchmarks
{
diff --git a/test/Apache.Arrow.Benchmarks/ArrowWriterBenchmark.cs b/test/Apache.Arrow.Benchmarks/ArrowWriterBenchmark.cs
index f35c2a5..36e8921 100644
--- a/test/Apache.Arrow.Benchmarks/ArrowWriterBenchmark.cs
+++ b/test/Apache.Arrow.Benchmarks/ArrowWriterBenchmark.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+using System.IO;
+using System.Threading.Tasks;
using Apache.Arrow.Ipc;
using Apache.Arrow.Tests;
using BenchmarkDotNet.Attributes;
-using System.IO;
-using System.Threading.Tasks;
namespace Apache.Arrow.Benchmarks
{
@@ -26,7 +26,7 @@ namespace Apache.Arrow.Benchmarks
public class ArrowWriterBenchmark
{
[Params(10_000, 1_000_000)]
- public int BatchLength{ get; set; }
+ public int BatchLength { get; set; }
//Max column set count is 15 before reaching 2gb limit of memory stream
[Params(10, 14)]
diff --git a/test/Apache.Arrow.Benchmarks/Program.cs b/test/Apache.Arrow.Benchmarks/Program.cs
index 0f1410f..da4423f 100644
--- a/test/Apache.Arrow.Benchmarks/Program.cs
+++ b/test/Apache.Arrow.Benchmarks/Program.cs
@@ -26,4 +26,4 @@ namespace Apache.Arrow.Benchmarks
.Run(args);
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Compression.Tests/ArrowFileReaderTests.cs b/test/Apache.Arrow.Compression.Tests/ArrowFileReaderTests.cs
index 667f25f..81ff6ed 100644
--- a/test/Apache.Arrow.Compression.Tests/ArrowFileReaderTests.cs
+++ b/test/Apache.Arrow.Compression.Tests/ArrowFileReaderTests.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
using System;
using System.Reflection;
+using Apache.Arrow.Ipc;
using Xunit;
namespace Apache.Arrow.Compression.Tests
@@ -35,8 +35,8 @@ namespace Apache.Arrow.Compression.Tests
var batch = reader.ReadNextRecordBatch();
- var intArray = (Int32Array) batch.Column("integers");
- var floatArray = (FloatArray) batch.Column("floats");
+ var intArray = (Int32Array)batch.Column("integers");
+ var floatArray = (FloatArray)batch.Column("floats");
const int numRows = 100;
Assert.Equal(numRows, intArray.Length);
diff --git a/test/Apache.Arrow.Compression.Tests/ArrowFileWriterTests.cs b/test/Apache.Arrow.Compression.Tests/ArrowFileWriterTests.cs
index a237f9c..d3340a3 100644
--- a/test/Apache.Arrow.Compression.Tests/ArrowFileWriterTests.cs
+++ b/test/Apache.Arrow.Compression.Tests/ArrowFileWriterTests.cs
@@ -57,7 +57,7 @@ namespace Apache.Arrow.Compression.Tests
CompressionCodec = codec,
CompressionLevel = compressionLevel,
};
- TestRoundTripRecordBatches(new [] {batch}, options, codecFactory);
+ TestRoundTripRecordBatches(new[] { batch }, options, codecFactory);
}
[Theory]
@@ -72,7 +72,7 @@ namespace Apache.Arrow.Compression.Tests
CompressionCodecFactory = codecFactory,
CompressionCodec = codec,
};
- await TestRoundTripRecordBatchesAsync(new [] {batch}, options, codecFactory);
+ await TestRoundTripRecordBatchesAsync(new[] { batch }, options, codecFactory);
}
private static void TestRoundTripRecordBatches(
diff --git a/test/Apache.Arrow.Compression.Tests/ArrowStreamReaderTests.cs b/test/Apache.Arrow.Compression.Tests/ArrowStreamReaderTests.cs
index 6f6a26e..e432e37 100644
--- a/test/Apache.Arrow.Compression.Tests/ArrowStreamReaderTests.cs
+++ b/test/Apache.Arrow.Compression.Tests/ArrowStreamReaderTests.cs
@@ -13,9 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
using System;
using System.Reflection;
+using Apache.Arrow.Ipc;
using Apache.Arrow.Tests;
using Xunit;
@@ -88,8 +88,8 @@ namespace Apache.Arrow.Compression.Tests
private static void VerifyCompressedIpcFileBatch(RecordBatch batch)
{
- var intArray = (Int32Array) batch.Column("integers");
- var floatArray = (FloatArray) batch.Column("floats");
+ var intArray = (Int32Array)batch.Column("integers");
+ var floatArray = (FloatArray)batch.Column("floats");
const int numRows = 100;
Assert.Equal(numRows, intArray.Length);
diff --git a/test/Apache.Arrow.Compression.Tests/ArrowStreamWriterTests.cs b/test/Apache.Arrow.Compression.Tests/ArrowStreamWriterTests.cs
index 1f0f61c..164de4b 100644
--- a/test/Apache.Arrow.Compression.Tests/ArrowStreamWriterTests.cs
+++ b/test/Apache.Arrow.Compression.Tests/ArrowStreamWriterTests.cs
@@ -58,7 +58,7 @@ namespace Apache.Arrow.Compression.Tests
CompressionCodec = codec,
CompressionLevel = compressionLevel,
};
- TestRoundTripRecordBatches(new [] {batch}, options, codecFactory);
+ TestRoundTripRecordBatches(new[] { batch }, options, codecFactory);
}
[Theory]
@@ -73,7 +73,7 @@ namespace Apache.Arrow.Compression.Tests
CompressionCodecFactory = codecFactory,
CompressionCodec = codec,
};
- await TestRoundTripRecordBatchesAsync(new [] {batch}, options, codecFactory);
+ await TestRoundTripRecordBatchesAsync(new[] { batch }, options, codecFactory);
}
[Fact]
@@ -86,7 +86,7 @@ namespace Apache.Arrow.Compression.Tests
CompressionCodecFactory = codecFactory,
CompressionCodec = CompressionCodecType.Lz4Frame,
};
- TestRoundTripRecordBatches(new [] {batch}, options, codecFactory);
+ TestRoundTripRecordBatches(new[] { batch }, options, codecFactory);
}
[Theory]
@@ -120,11 +120,11 @@ namespace Apache.Arrow.Compression.Tests
var allocator = new TestMemoryAllocator();
var originalBatch = TestData.CreateSampleRecordBatch(length: 100);
var options = new IpcOptions() { CompressionCodecFactory = new CompressionCodecFactory(), CompressionCodec = codec };
- await TestRoundTripRecordBatchesAsync(new List<RecordBatch> () {originalBatch}, options, options.CompressionCodecFactory,
+ await TestRoundTripRecordBatchesAsync(new List<RecordBatch>() { originalBatch }, options, options.CompressionCodecFactory,
allocator);
Assert.True(allocator.Statistics.Allocations > 0);
// make sure all memory allocated by the writer was disposed
- Assert.Equal(0,allocator.Rented);
+ Assert.Equal(0, allocator.Rented);
}
private static void TestRoundTripRecordBatches(
diff --git a/test/Apache.Arrow.Flight.IntegrationTest/Scenarios/JsonTestScenario.cs b/test/Apache.Arrow.Flight.IntegrationTest/Scenarios/JsonTestScenario.cs
index 7847510..6b25366 100644
--- a/test/Apache.Arrow.Flight.IntegrationTest/Scenarios/JsonTestScenario.cs
+++ b/test/Apache.Arrow.Flight.IntegrationTest/Scenarios/JsonTestScenario.cs
@@ -23,8 +23,8 @@ using Apache.Arrow.IntegrationTest;
using Apache.Arrow.Tests;
using Apache.Arrow.Types;
using Google.Protobuf;
-using Grpc.Net.Client;
using Grpc.Core;
+using Grpc.Net.Client;
using Grpc.Net.Client.Balancer;
using Microsoft.Extensions.DependencyInjection;
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlClientTests.cs b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlClientTests.cs
index 17a5e6f..38a6fe8 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlClientTests.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlClientTests.cs
@@ -139,7 +139,7 @@ public class FlightSqlClientTests : IDisposable
PreparedStatement preparedStatement;
if (expectTransaction)
{
- preparedStatement = await _flightSqlClient.PrepareAsync(query, transaction);
+ preparedStatement = await _flightSqlClient.PrepareAsync(query, transaction);
}
else
{
@@ -865,4 +865,4 @@ public class FlightSqlClientTests : IDisposable
Assert.Equal(expectedField.Metadata, actualField.Metadata);
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlPreparedStatementTests.cs b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlPreparedStatementTests.cs
index 24647bf..3e40293 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlPreparedStatementTests.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlPreparedStatementTests.cs
@@ -68,7 +68,7 @@ namespace Apache.Arrow.Flight.Sql.Tests
new Int32Array.Builder().AppendRange(new[] { 32, 255, 1 }).Build()
}, 3);
}
-
+
[Fact]
public async Task ExecuteAsync_ShouldReturnFlightInfo_WhenValidInputsAreProvided()
{
@@ -184,7 +184,7 @@ namespace Apache.Arrow.Flight.Sql.Tests
ActionCreatePreparedStatementResult actionResult = string.IsNullOrEmpty(handle)
? new ActionCreatePreparedStatementResult()
: new ActionCreatePreparedStatementResult
- { PreparedStatementHandle = ByteString.CopyFrom(handle, Encoding.UTF8) };
+ { PreparedStatementHandle = ByteString.CopyFrom(handle, Encoding.UTF8) };
var flightData = new FlightData(_flightDescriptor, ByteString.CopyFrom(actionResult.ToByteArray()));
var results = GetAsyncEnumerable(new List<FlightData> { flightData });
@@ -223,4 +223,4 @@ namespace Apache.Arrow.Flight.Sql.Tests
return new RecordBatch.Builder().Append("field1", true, int32Array).Build();
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlServerTests.cs b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlServerTests.cs
index e5e64b0..db33da9 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlServerTests.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlServerTests.cs
@@ -43,7 +43,7 @@ public class FlightSqlServerTests
if (type == FlightDescriptorType.Command)
{
descriptor = expectedResult != null ?
- FlightDescriptor.CreateCommandDescriptor(((IMessage) Activator.CreateInstance(expectedResult!)!).PackAndSerialize().ToByteArray()) :
+ FlightDescriptor.CreateCommandDescriptor(((IMessage)Activator.CreateInstance(expectedResult!)!).PackAndSerialize().ToByteArray()) :
FlightDescriptor.CreateCommandDescriptor(ByteString.Empty.ToStringUtf8());
}
else
@@ -74,14 +74,14 @@ public class FlightSqlServerTests
[Theory]
[InlineData(false,
- new[] {"catalog_name", "db_schema_name", "table_name", "table_type"},
- new[] {typeof(StringType), typeof(StringType), typeof(StringType), typeof(StringType)},
- new[] {true, true, false, false})
+ new[] { "catalog_name", "db_schema_name", "table_name", "table_type" },
+ new[] { typeof(StringType), typeof(StringType), typeof(StringType), typeof(StringType) },
+ new[] { true, true, false, false })
]
[InlineData(true,
- new[] {"catalog_name", "db_schema_name", "table_name", "table_type", "table_schema"},
- new[] {typeof(StringType), typeof(StringType), typeof(StringType), typeof(StringType), typeof(BinaryType)},
- new[] {true, true, false, false, false})
+ new[] { "catalog_name", "db_schema_name", "table_name", "table_type", "table_schema" },
+ new[] { typeof(StringType), typeof(StringType), typeof(StringType), typeof(StringType), typeof(BinaryType) },
+ new[] { true, true, false, false, false })
]
public void EnsureTableSchemaIsCorrectWithoutTableSchema(bool includeTableSchemaField, string[] expectedNames, Type[] expectedTypes, bool[] expectedIsNullable)
{
@@ -119,7 +119,7 @@ public class FlightSqlServerTests
public async Task EnsureGetFlightInfoIsCorrectlyRoutedForCommand(Type commandType, string expectedResult)
{
//Given
- var command = (IMessage) Activator.CreateInstance(commandType)!;
+ var command = (IMessage)Activator.CreateInstance(commandType)!;
var producer = new TestFlightSqlSever();
var descriptor = FlightDescriptor.CreateCommandDescriptor(command.PackAndSerialize().ToArray());
@@ -180,7 +180,7 @@ public class FlightSqlServerTests
{
//Given
var producer = new TestFlightSqlSever();
- var command = (IMessage) Activator.CreateInstance(commandType)!;
+ var command = (IMessage)Activator.CreateInstance(commandType)!;
var ticket = new FlightTicket(command.PackAndSerialize());
var streamWriter = new MockServerStreamWriter<FlightData>();
@@ -218,7 +218,7 @@ public class FlightSqlServerTests
{
//Given
var producer = new TestFlightSqlSever();
- var actionBody = (IMessage) Activator.CreateInstance(actionBodyType)!;
+ var actionBody = (IMessage)Activator.CreateInstance(actionBodyType)!;
var action = new FlightAction(actionType, actionBody.PackAndSerialize());
var mockStreamWriter = new MockStreamWriter<FlightResult>();
@@ -241,7 +241,7 @@ public class FlightSqlServerTests
public async Task EnsureDoPutIsCorrectlyRoutedForTheCommand(Type commandType, string expectedResponse, bool isException = false)
{
//Given
- var command = (IMessage) Activator.CreateInstance(commandType)!;
+ var command = (IMessage)Activator.CreateInstance(commandType)!;
var producer = new TestFlightSqlSever();
var descriptor = FlightDescriptor.CreateCommandDescriptor(command.PackAndSerialize().ToArray());
var recordBatch = new RecordBatch(new Schema(new List<Field>(), null), System.Array.Empty<Int8Array>(), 0);
@@ -338,7 +338,7 @@ internal static class MockStreamReaderWriterExtensions
}
}
-internal class MockStreamReader<T>: IAsyncStreamReader<T>
+internal class MockStreamReader<T> : IAsyncStreamReader<T>
{
private readonly IEnumerator<T> _flightActions;
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestExtensions.cs b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestExtensions.cs
index c1cd8f2..f82b3a6 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestExtensions.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestExtensions.cs
@@ -97,13 +97,13 @@ internal static class TestSchemaExtensions
return new RecordBatch(schema.Build(), paramsList, values.Length);
}
-
+
public static void PrintSchema(this Schema schema)
{
Console.WriteLine("Schema Fields:");
Console.WriteLine("{0,-20} {1,-20} {2,-20}", "Field Name", "Field Type", "Is Nullable");
Console.WriteLine(new string('-', 60));
-
+
foreach (var field in schema.FieldsLookup)
{
string fieldName = field.First().Name;
@@ -125,7 +125,7 @@ internal static class TestSchemaExtensions
_ => "Unsupported Type"
};
}
-
+
public static void PrintRecordBatch(RecordBatch recordBatch)
{
int rowCount = recordBatch.Length;
@@ -158,7 +158,7 @@ internal static class TestSchemaExtensions
return new RecordBatch(schema, [idArrayBuilder.Build(), valueArrayBuilder.Build()], ids.Length);
}
-
+
public static RecordBatch CreateRecordBatch<T>(T[] items)
{
if (items is null || items.Length == 0)
@@ -167,7 +167,7 @@ internal static class TestSchemaExtensions
}
var schema = BuildSchema(typeof(T));
-
+
var arrays = new List<IArrowArray>();
foreach (var field in schema.FieldsList)
{
@@ -176,7 +176,7 @@ internal static class TestSchemaExtensions
{
throw new InvalidOperationException($"Property {field.Name} not found in type {typeof(T).Name}.");
}
-
+
// extract values and build the array
var values = items.Select(item => property.GetValue(item, null)).ToArray();
var array = BuildArrowArray(field.DataType, values);
@@ -196,7 +196,7 @@ internal static class TestSchemaExtensions
return builder.Build();
}
-
+
private static IArrowType InferArrowType(Type type)
{
return type switch
@@ -209,7 +209,7 @@ internal static class TestSchemaExtensions
_ => throw new NotSupportedException($"Unsupported type: {type}")
};
}
-
+
private static IArrowArray BuildArrowArray(IArrowType dataType, object[] values, MemoryAllocator allocator = default)
{
allocator ??= MemoryAllocator.Default.Value;
@@ -224,7 +224,7 @@ internal static class TestSchemaExtensions
_ => throw new NotSupportedException($"Unsupported Arrow type: {dataType}")
};
}
-
+
private static IArrowArray BuildStringArray(object[] values)
{
var builder = new StringArray.Builder();
@@ -243,7 +243,7 @@ internal static class TestSchemaExtensions
return builder.Build();
}
-
+
private static IArrowArray BuildArray<T, TArray, TBuilder>(object[] values, MemoryAllocator allocator)
where TArray : IArrowArray
where TBuilder : IArrowArrayBuilder<T, TArray, TBuilder>, new()
@@ -264,4 +264,4 @@ internal static class TestSchemaExtensions
return builder.Build(allocator);
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestUtils.cs b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestUtils.cs
index e32cc19..d3f55fd 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestUtils.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/FlightSqlTestUtils.cs
@@ -30,7 +30,7 @@ public class FlightSqlTestUtils
_flightStore = flightStore;
}
- public RecordBatch CreateTestBatch(int startValue, int length)
+ public RecordBatch CreateTestBatch(int startValue, int length)
{
var batchBuilder = new RecordBatch.Builder();
Int32Array.Builder builder = new();
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/Startup.cs b/test/Apache.Arrow.Flight.Sql.Tests/Startup.cs
index b99418c..ec94223 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/Startup.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/Startup.cs
@@ -54,4 +54,4 @@ public class StartupFlightSql
});
});
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlSever.cs b/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlSever.cs
index 3dca632..bea8bca 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlSever.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlSever.cs
@@ -83,7 +83,7 @@ public class TestFlightSqlSever : FlightSqlServer
private RecordBatch MockRecordBatch(string name)
{
- var schema = new Schema(new List<Field> {new(name, StringType.Default, false)}, System.Array.Empty<KeyValuePair<string, string>>());
- return new RecordBatch(schema, new []{ new StringArray.Builder().Append(name).Build() }, 1);
+ var schema = new Schema(new List<Field> { new(name, StringType.Default, false) }, System.Array.Empty<KeyValuePair<string, string>>());
+ return new RecordBatch(schema, new[] { new StringArray.Builder().Append(name).Build() }, 1);
}
}
diff --git a/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlWebFactory.cs b/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlWebFactory.cs
index 594c5d8..4fb400a 100644
--- a/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlWebFactory.cs
+++ b/test/Apache.Arrow.Flight.Sql.Tests/TestFlightSqlWebFactory.cs
@@ -79,4 +79,4 @@ public class TestFlightSqlWebFactory : IDisposable
{
Stop();
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Flight.TestWeb/FlightHolder.cs b/test/Apache.Arrow.Flight.TestWeb/FlightHolder.cs
index b79edc4..d0c0189 100644
--- a/test/Apache.Arrow.Flight.TestWeb/FlightHolder.cs
+++ b/test/Apache.Arrow.Flight.TestWeb/FlightHolder.cs
@@ -30,7 +30,7 @@ namespace Apache.Arrow.Flight.TestWeb
//Not thread safe, but only used in tests
private readonly List<RecordBatchWithMetadata> _recordBatches = new List<RecordBatchWithMetadata>();
-
+
public FlightHolder(FlightDescriptor flightDescriptor, Schema schema, string location)
{
_flightDescriptor = flightDescriptor;
@@ -52,7 +52,7 @@ namespace Apache.Arrow.Flight.TestWeb
public FlightInfo GetFlightInfo()
{
int batchArrayLength = _recordBatches.Sum(rb => rb.RecordBatch.Length);
- int batchBytes = _recordBatches.Sum(rb => rb.RecordBatch.Arrays.Sum(arr => arr.Data.Buffers.Sum(b=>b.Length)));
+ int batchBytes = _recordBatches.Sum(rb => rb.RecordBatch.Arrays.Sum(arr => arr.Data.Buffers.Sum(b => b.Length)));
return new FlightInfo(_schema, _flightDescriptor, new List<FlightEndpoint>()
{
new FlightEndpoint(new FlightTicket(GetTicket(_flightDescriptor)), new List<FlightLocation>(){
@@ -67,7 +67,7 @@ namespace Apache.Arrow.Flight.TestWeb
{
return descriptor.Paths.FirstOrDefault();
}
-
+
if (descriptor.Command.Length > 0)
{
return $"{descriptor.Command.ToStringUtf8()}";
@@ -76,4 +76,4 @@ namespace Apache.Arrow.Flight.TestWeb
return "default_custom_ticket";
}
}
-}
\ No newline at end of file
+}
diff --git a/test/Apache.Arrow.Flight.TestWeb/TestFlightServer.cs b/test/Apache.Arrow.Flight.TestWeb/TestFlightServer.cs
index 5689b45..b0d07ba 100644
--- a/test/Apache.Arrow.Flight.TestWeb/TestFlightServer.cs
+++ b/test/Apache.Arrow.Flight.TestWeb/TestFlightServer.cs
@@ -49,13 +49,13 @@ namespace Apache.Arrow.Flight.TestWeb
{
var flightDescriptor = FlightDescriptor.CreatePathDescriptor(ticket.Ticket.ToStringUtf8());
- if(_flightStore.Flights.TryGetValue(flightDescriptor, out var flightHolder))
+ if (_flightStore.Flights.TryGetValue(flightDescriptor, out var flightHolder))
{
await responseStream.SetupStream(flightHolder.GetFlightInfo().Schema);
var batches = flightHolder.GetRecordBatches();
- foreach(var batch in batches)
+ foreach (var batch in batches)
{
await responseStream.WriteAsync(batch.RecordBatch, batch.Metadata);
}
@@ -66,7 +66,7 @@ namespace Apache.Arrow.Flight.TestWeb
{
var flightDescriptor = await requestStream.FlightDescriptor;
- if(!_flightStore.Flights.TryGetValue(flightDescriptor, out var flightHolder))
+ if (!_flightStore.Flights.TryGetValue(flightDescriptor, out var flightHolder))
{
flightHolder = new FlightHolder(flightDescriptor, await requestStream.Schema, $"grpc+tcp://{context.Host}");
_flightStore.Flights.Add(flightDescriptor, flightHolder);
@@ -83,7 +83,7 @@ namespace Apache.Arrow.Flight.TestWeb
public override Task<FlightInfo> GetFlightInfo(FlightDescriptor request, ServerCallContext context)
{
- if(_flightStore.Flights.TryGetValue(request, out var flightHolder))
+ if (_flightStore.Flights.TryGetValue(request, out var flightHolder))
{
return Task.FromResult(flightHolder.GetFlightInfo());
}
@@ -107,7 +107,7 @@ namespace Apache.Arrow.Flight.TestWeb
public override Task<Schema> GetSchema(FlightDescriptor request, ServerCallContext context)
{
- if(_flightStore.Flights.TryGetValue(request, out var flightHolder))
+ if (_flightStore.Flights.TryGetValue(request, out var flightHolder))
{
return Task.FromResult(flightHolder.GetFlightInfo().Schema);
}
@@ -126,7 +126,7 @@ namespace Apache.Arrow.Flight.TestWeb
{
var flightInfos = _flightStore.Flights.Select(x => x.Value.GetFlightInfo()).ToList();
- foreach(var flightInfo in flightInfos)
+ foreach (var flightInfo in flightInfos)
{
await responseStream.WriteAsync(flightInfo);
}
@@ -134,7 +134,7 @@ namespace Apache.Arrow.Flight.TestWeb
public override async Task DoExchange(FlightServerRecordBatchStreamReader requestStream, FlightServerRecordBatchStreamWriter responseStream, ServerCallContext context)
{
- while(await requestStream.MoveNext().ConfigureAwait(false))
+ while (await requestStream.MoveNext().ConfigureAwait(false))
{
await responseStream.WriteAsync(requestStream.Current, requestStream.ApplicationMetadata.FirstOrDefault()).ConfigureAwait(false);
}
diff --git a/test/Apache.Arrow.Flight.TestWeb/TestFlightSqlServer.cs b/test/Apache.Arrow.Flight.TestWeb/TestFlightSqlServer.cs
index a7aaad4..60ece65 100644
--- a/test/Apache.Arrow.Flight.TestWeb/TestFlightSqlServer.cs
+++ b/test/Apache.Arrow.Flight.TestWeb/TestFlightSqlServer.cs
@@ -97,7 +97,7 @@ public class TestFlightSqlServer : FlightServer
}
}
}
-
+
public override async Task DoPut(FlightServerRecordBatchStreamReader requestStream, IAsyncStreamWriter<FlightPutResult> responseStream, ServerCallContext context)
{
var flightDescriptor = await requestStream.FlightDescriptor;
@@ -107,7 +107,7 @@ public class TestFlightSqlServer : FlightServer
flightHolder = new FlightHolder(flightDescriptor, await requestStream.Schema, $"http://{context.Host}");
_flightStore.Flights.Add(flightDescriptor, flightHolder);
}
-
+
int affectedRows = 0;
while (await requestStream.MoveNext())
{
@@ -129,7 +129,7 @@ public class TestFlightSqlServer : FlightServer
var flightPutResult = new FlightPutResult(metadata);
await responseStream.WriteAsync(flightPutResult);
}
-
+
public override Task<FlightInfo> GetFlightInfo(FlightDescriptor request, ServerCallContext context)
{
if (_flightStore.Flights.TryGetValue(request, out var flightHolder))
@@ -144,7 +144,7 @@ public class TestFlightSqlServer : FlightServer
throw new RpcException(new Status(StatusCode.NotFound, "Flight not found"));
}
-
+
public override Task<Schema> GetSchema(FlightDescriptor request, ServerCallContext context)
{
if (_flightStore.Flights.TryGetValue(request, out var flightHolder))
diff --git a/test/Apache.Arrow.Flight.Tests/FlightInfoComparer.cs b/test/Apache.Arrow.Flight.Tests/FlightInfoComparer.cs
index 8f3af17..a55304a 100644
--- a/test/Apache.Arrow.Flight.Tests/FlightInfoComparer.cs
+++ b/test/Apache.Arrow.Flight.Tests/FlightInfoComparer.cs
@@ -38,7 +38,7 @@ namespace Apache.Arrow.Flight.Tests
Assert.Equal(expected.Ordered, actual.Ordered);
Assert.Equal(expected.AppMetadata, actual.AppMetadata);
-
+
}
}
}
diff --git a/test/Apache.Arrow.Flight.Tests/FlightTests.cs b/test/Apache.Arrow.Flight.Tests/FlightTests.cs
index acdd824..b1b52e8 100644
--- a/test/Apache.Arrow.Flight.Tests/FlightTests.cs
+++ b/test/Apache.Arrow.Flight.Tests/FlightTests.cs
@@ -512,7 +512,7 @@ namespace Apache.Arrow.Flight.Tests
{
var cts = new CancellationTokenSource();
cts.CancelAfter(1);
-
+
var batch = CreateTestBatch(0, 100);
var metadata = new Metadata();
var flightDescriptor = FlightDescriptor.CreatePathDescriptor("raise_cancelled");
diff --git a/test/Apache.Arrow.IntegrationTest/CDataInterface.cs b/test/Apache.Arrow.IntegrationTest/CDataInterface.cs
index 2fabae1..3f701dc 100644
--- a/test/Apache.Arrow.IntegrationTest/CDataInterface.cs
+++ b/test/Apache.Arrow.IntegrationTest/CDataInterface.cs
@@ -18,8 +18,8 @@ using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.IO;
-using Apache.Arrow.C;
using Apache.Arrow.Arrays;
+using Apache.Arrow.C;
using Apache.Arrow.Types;
namespace Apache.Arrow.IntegrationTest
@@ -45,22 +45,22 @@ namespace Apache.Arrow.IntegrationTest
public static unsafe Schema ImportSchema(long ptr)
{
- return CArrowSchemaImporter.ImportSchema((CArrowSchema*) ptr);
+ return CArrowSchemaImporter.ImportSchema((CArrowSchema*)ptr);
}
public static unsafe void ExportSchema(Schema schema, long ptr)
{
- CArrowSchemaExporter.ExportSchema(schema, (CArrowSchema*) ptr);
+ CArrowSchemaExporter.ExportSchema(schema, (CArrowSchema*)ptr);
}
public static unsafe RecordBatch ImportRecordBatch(long ptr, Schema schema)
{
- return CArrowArrayImporter.ImportRecordBatch((CArrowArray*) ptr, schema);
+ return CArrowArrayImporter.ImportRecordBatch((CArrowArray*)ptr, schema);
}
public static unsafe void ExportRecordBatch(RecordBatch batch, long ptr)
{
- CArrowArrayExporter.ExportRecordBatch(batch, (CArrowArray*) ptr);
+ CArrowArrayExporter.ExportRecordBatch(batch, (CArrowArray*)ptr);
}
public static JsonFile ParseJsonFile(string jsonPath)
diff --git a/test/Apache.Arrow.IntegrationTest/Program.cs b/test/Apache.Arrow.IntegrationTest/Program.cs
index 2432693..8dedd60 100644
--- a/test/Apache.Arrow.IntegrationTest/Program.cs
+++ b/test/Apache.Arrow.IntegrationTest/Program.cs
@@ -13,7 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.CommandLine;
@@ -21,6 +20,7 @@ using System.CommandLine.Invocation;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
+using Apache.Arrow.Types;
namespace Apache.Arrow.IntegrationTest
{
diff --git a/test/Apache.Arrow.Tests/ArrayBuilderTests.cs b/test/Apache.Arrow.Tests/ArrayBuilderTests.cs
index f789d6a..7588c34 100644
--- a/test/Apache.Arrow.Tests/ArrayBuilderTests.cs
+++ b/test/Apache.Arrow.Tests/ArrayBuilderTests.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
+using Apache.Arrow.Types;
using Xunit;
namespace Apache.Arrow.Tests
diff --git a/test/Apache.Arrow.Tests/ArrowArrayConcatenatorTests.cs b/test/Apache.Arrow.Tests/ArrowArrayConcatenatorTests.cs
index a45a50c..758c426 100644
--- a/test/Apache.Arrow.Tests/ArrowArrayConcatenatorTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowArrayConcatenatorTests.cs
@@ -257,7 +257,7 @@ namespace Apache.Arrow.Tests
}
else
{
- builder.Append(new byte[] {(byte)x, (byte)(x + 1)}.AsSpan());
+ builder.Append(new byte[] { (byte)x, (byte)(x + 1) }.AsSpan());
}
});
@@ -270,7 +270,7 @@ namespace Apache.Arrow.Tests
}
else
{
- builder.Append(new byte[] {(byte)x, (byte)(x + 1)}.AsSpan());
+ builder.Append(new byte[] { (byte)x, (byte)(x + 1) }.AsSpan());
}
});
@@ -525,7 +525,7 @@ namespace Apache.Arrow.Tests
}
private void GenerateTestData<TArray, TArrayBuilder>(
- IArrowType type, Action<TArrayBuilder, int> buildAction, Action<TArrayBuilder, int> initAction=null)
+ IArrowType type, Action<TArrayBuilder, int> buildAction, Action<TArrayBuilder, int> initAction = null)
where TArrayBuilder : IArrowArrayBuilder<TArray, TArrayBuilder>
where TArray : IArrowArray
{
diff --git a/test/Apache.Arrow.Tests/ArrowArrayTests.cs b/test/Apache.Arrow.Tests/ArrowArrayTests.cs
index c3c21c4..f96ce7e 100644
--- a/test/Apache.Arrow.Tests/ArrowArrayTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowArrayTests.cs
@@ -101,7 +101,7 @@ namespace Apache.Arrow.Tests
{
var array = new Int64Array.Builder().Append(1).Append(2).Build();
- foreach(long? foo in array)
+ foreach (long? foo in array)
{
Assert.InRange(foo!.Value, 1, 2);
}
@@ -262,14 +262,14 @@ namespace Apache.Arrow.Tests
var initialValues = Enumerable.Range(0, 100).ToArray();
var array = new Int32Array.Builder().AppendRange(initialValues).Build();
- var sliced = (Int32Array) array.Slice(20, 30);
- var slicedAgain = (Int32Array) sliced.Slice(5, 10);
+ var sliced = (Int32Array)array.Slice(20, 30);
+ var slicedAgain = (Int32Array)sliced.Slice(5, 10);
Assert.Equal(25, slicedAgain.Offset);
Assert.Equal(10, slicedAgain.Length);
Assert.Equal(
- initialValues.Skip(25).Take(10).Select(val => (int?) val).ToArray(),
- (IReadOnlyList<int?>) slicedAgain);
+ initialValues.Skip(25).Take(10).Select(val => (int?)val).ToArray(),
+ (IReadOnlyList<int?>)slicedAgain);
}
#if NET5_0_OR_GREATER
@@ -461,7 +461,7 @@ namespace Apache.Arrow.Tests
Assert.True(baseArray.Values.SequenceEqual(slicedArray.Values));
Assert.True(
- baseArray.ValueBuffer.Span.Slice(0, (int) Math.Ceiling(slicedArray.Length / 8.0))
+ baseArray.ValueBuffer.Span.Slice(0, (int)Math.Ceiling(slicedArray.Length / 8.0))
.SequenceEqual(slicedArray.Values));
Assert.Equal(baseArray.GetValue(slicedArray.Offset), slicedArray.GetValue(0));
diff --git a/test/Apache.Arrow.Tests/ArrowBufferBitmapBuilderTests.cs b/test/Apache.Arrow.Tests/ArrowBufferBitmapBuilderTests.cs
index a4e698f..148ccea 100644
--- a/test/Apache.Arrow.Tests/ArrowBufferBitmapBuilderTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowBufferBitmapBuilderTests.cs
@@ -28,8 +28,8 @@ namespace Apache.Arrow.Tests
public class Append
{
[Theory]
- [InlineData(new bool[] {}, false, 1, 0, 1)]
- [InlineData(new bool[] {}, true, 1, 1, 0)]
+ [InlineData(new bool[] { }, false, 1, 0, 1)]
+ [InlineData(new bool[] { }, true, 1, 1, 0)]
[InlineData(new[] { true, false }, true, 3, 2, 1)]
[InlineData(new[] { true, false }, false, 3, 1, 2)]
public void IncreasesLength(
@@ -55,8 +55,8 @@ namespace Apache.Arrow.Tests
}
[Theory]
- [InlineData(new bool[] {}, false)]
- [InlineData(new bool[] {}, true)]
+ [InlineData(new bool[] { }, false)]
+ [InlineData(new bool[] { }, true)]
[InlineData(new[] { true, false }, true)]
[InlineData(new[] { true, false }, false)]
public void AfterClearIncreasesLength(bool[] initialContentsToClear, bool valueToAppend)
@@ -98,7 +98,7 @@ namespace Apache.Arrow.Tests
public class AppendSpan
{
[Theory]
- [InlineData(new byte[] { 0b00000110 }, 4, 4, 2, 2)]
+ [InlineData(new byte[] { 0b00000110 }, 4, 4, 2, 2)]
[InlineData(new byte[] { 0b11111110 }, 4, 4, 3, 1)]
[InlineData(new byte[] { 0b11111110, 0b00000001 }, 9, 9, 8, 1)]
[InlineData(new byte[] { 0b11111001, 0b00000001 }, 9, 9, 7, 2)]
@@ -209,9 +209,9 @@ namespace Apache.Arrow.Tests
public class AppendRange
{
[Theory]
- [InlineData(new bool[] {}, new bool[] {}, 0, 0, 0)]
- [InlineData(new bool[] {}, new[] { true, false }, 2, 1, 1)]
- [InlineData(new[] { true, false }, new bool[] {}, 2, 1, 1)]
+ [InlineData(new bool[] { }, new bool[] { }, 0, 0, 0)]
+ [InlineData(new bool[] { }, new[] { true, false }, 2, 1, 1)]
+ [InlineData(new[] { true, false }, new bool[] { }, 2, 1, 1)]
[InlineData(new[] { true, false }, new[] { true, false }, 4, 2, 2)]
public void AppendingEnumerableIncreasesLength(
bool[] initialContents,
@@ -311,11 +311,11 @@ namespace Apache.Arrow.Tests
public class Resize
{
[Theory]
- [InlineData(new bool[] {}, 256, 0, 256)]
- [InlineData(new[] { true, true, true, true}, 256, 4, 252)]
- [InlineData(new[] { false, false, false, false}, 256, 0, 256)]
- [InlineData(new[] { true, true, true, true}, 2, 2, 0)]
- [InlineData(new[] { true, true, true, true}, 0, 0, 0)]
+ [InlineData(new bool[] { }, 256, 0, 256)]
+ [InlineData(new[] { true, true, true, true }, 256, 4, 252)]
+ [InlineData(new[] { false, false, false, false }, 256, 0, 256)]
+ [InlineData(new[] { true, true, true, true }, 2, 2, 0)]
+ [InlineData(new[] { true, true, true, true }, 0, 0, 0)]
public void LengthHasExpectedValueAfterResize(
bool[] bits, int newSize, int expectedSetBitCount, int expectedUnsetBitCount)
{
@@ -383,22 +383,22 @@ namespace Apache.Arrow.Tests
{
[Theory]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
2,
new byte[] { 0b01010101, 0b00000001 },
5, 5)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
3,
new byte[] { 0b01011101, 0b00000001 },
6, 4)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
8,
new byte[] { 0b01010101, 0b00000001 },
5, 5)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
9,
new byte[] { 0b01010101, 0b00000011 },
6, 4)]
@@ -423,42 +423,42 @@ namespace Apache.Arrow.Tests
[Theory]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
2, true,
new byte[] { 0b01010101, 0b00000001 },
5, 5)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
2, false,
new byte[] { 0b01010001, 0b00000001 },
4, 6)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
3, true,
new byte[] { 0b01011101, 0b00000001 },
6, 4)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
3, false,
new byte[] { 0b01010101, 0b00000001 },
5, 5)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
8, true,
new byte[] { 0b01010101, 0b00000001 },
5, 5)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
8, false,
new byte[] { 0b01010101, 0b00000000 },
4, 6)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
9, true,
new byte[] { 0b01010101, 0b00000011 },
6, 4)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
9, false,
new byte[] { 0b01010101, 0b00000001 },
5, 5)]
@@ -504,19 +504,19 @@ namespace Apache.Arrow.Tests
{
[Theory]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
0, 2,
new byte[] { 0b01010101, 0b00000001 })]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
0, 3,
new byte[] { 0b01011100, 0b00000001 })]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
4, 8,
new byte[] { 0b01010101, 0b00000001 })]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
4, 9,
new byte[] { 0b01000101, 0b00000011 })]
public void SwapsAsExpected(bool[] bits, int firstIndex, int secondIndex, byte[] expectedBytes)
@@ -565,22 +565,22 @@ namespace Apache.Arrow.Tests
{
[Theory]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
2,
new byte[] { 0b01010001, 0b00000001 },
4, 6)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
3,
new byte[] { 0b01011101, 0b00000001 },
6, 4)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
8,
new byte[] { 0b01010101, 0b00000000 },
4, 6)]
[InlineData(
- new[] { true, false, true, false, true, false, true, false, true, false},
+ new[] { true, false, true, false, true, false, true, false, true, false },
9,
new byte[] { 0b01010101, 0b00000011 },
6, 4)]
diff --git a/test/Apache.Arrow.Tests/ArrowBufferTests.cs b/test/Apache.Arrow.Tests/ArrowBufferTests.cs
index e6fa525..15ab3d3 100644
--- a/test/Apache.Arrow.Tests/ArrowBufferTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowBufferTests.cs
@@ -13,16 +13,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Tests.Fixtures;
using System;
using System.Runtime.InteropServices;
+using Apache.Arrow.Tests.Fixtures;
using Xunit;
namespace Apache.Arrow.Tests
{
public class ArrowBufferTests
{
- public class Allocate :
+ public class Allocate :
IClassFixture<DefaultMemoryAllocatorFixture>
{
private readonly DefaultMemoryAllocatorFixture _memoryPoolFixture;
@@ -73,7 +73,7 @@ namespace Apache.Arrow.Tests
var buffer = builder.Build();
fixed (byte* ptr = &buffer.Span.GetPinnableReference())
- {
+ {
Assert.True(new IntPtr(ptr).ToInt64() % 64 == 0);
}
}
@@ -85,7 +85,7 @@ namespace Apache.Arrow.Tests
public void HasZeroPadding()
{
var buffer = new ArrowBuffer.Builder<byte>(10).Append(0).Build();
-
+
foreach (var b in buffer.Span)
{
Assert.Equal(0, b);
diff --git a/test/Apache.Arrow.Tests/ArrowFileReaderTests.cs b/test/Apache.Arrow.Tests/ArrowFileReaderTests.cs
index 585b1ac..b86e6ec 100644
--- a/test/Apache.Arrow.Tests/ArrowFileReaderTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowFileReaderTests.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
using System;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
+using Apache.Arrow.Ipc;
using Xunit;
namespace Apache.Arrow.Tests
diff --git a/test/Apache.Arrow.Tests/ArrowFileWriterTests.cs b/test/Apache.Arrow.Tests/ArrowFileWriterTests.cs
index 7b25910..60980e2 100644
--- a/test/Apache.Arrow.Tests/ArrowFileWriterTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowFileWriterTests.cs
@@ -13,12 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
+using Apache.Arrow.Ipc;
using Apache.Arrow.Types;
using Xunit;
diff --git a/test/Apache.Arrow.Tests/ArrowReaderVerifier.cs b/test/Apache.Arrow.Tests/ArrowReaderVerifier.cs
index 5977c32..bdbe4bb 100644
--- a/test/Apache.Arrow.Tests/ArrowReaderVerifier.cs
+++ b/test/Apache.Arrow.Tests/ArrowReaderVerifier.cs
@@ -13,14 +13,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
-using Apache.Arrow.Types;
using System;
+using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Apache.Arrow.Arrays;
+using Apache.Arrow.Ipc;
+using Apache.Arrow.Types;
using Xunit;
-using System.Diagnostics;
namespace Apache.Arrow.Tests
{
diff --git a/test/Apache.Arrow.Tests/ArrowStreamReaderTests.cs b/test/Apache.Arrow.Tests/ArrowStreamReaderTests.cs
index c375457..15dc425 100644
--- a/test/Apache.Arrow.Tests/ArrowStreamReaderTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowStreamReaderTests.cs
@@ -13,13 +13,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
-using Apache.Arrow.Memory;
using System;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
+using Apache.Arrow.Ipc;
+using Apache.Arrow.Memory;
using Xunit;
namespace Apache.Arrow.Tests
diff --git a/test/Apache.Arrow.Tests/ArrowStreamWriterTests.cs b/test/Apache.Arrow.Tests/ArrowStreamWriterTests.cs
index 570fb03..42e69dc 100644
--- a/test/Apache.Arrow.Tests/ArrowStreamWriterTests.cs
+++ b/test/Apache.Arrow.Tests/ArrowStreamWriterTests.cs
@@ -266,7 +266,7 @@ namespace Apache.Arrow.Tests
{
using (MemoryStream stream = new MemoryStream())
{
- using (var writer = new ArrowStreamWriter(stream, originalBatches[0].Schema, leaveOpen: true, options, memoryAllocator ?? new TestMemoryAllocator()))
+ using (var writer = new ArrowStreamWriter(stream, originalBatches[0].Schema, leaveOpen: true, options, memoryAllocator ?? new TestMemoryAllocator()))
{
foreach (RecordBatch originalBatch in originalBatches)
{
@@ -659,7 +659,8 @@ namespace Apache.Arrow.Tests
var listBuilder = new ListArray.Builder(StringType.Default);
var valueBuilder = listBuilder.ValueBuilder as StringArray.Builder;
- foreach(string data in dictionaryDataBase) {
+ foreach (string data in dictionaryDataBase)
+ {
listBuilder.Append();
valueBuilder.Append(data);
}
@@ -730,10 +731,10 @@ namespace Apache.Arrow.Tests
.ToList();
var slicedBatch = new RecordBatch(originalBatch.Schema, slicedArrays, sliceLength);
var allocator = new TestMemoryAllocator();
- await TestRoundTripRecordBatchesAsync(new List<RecordBatch> () {slicedBatch}, null, false, allocator);
- if(sliceOffset % 8 != 0)
+ await TestRoundTripRecordBatchesAsync(new List<RecordBatch>() { slicedBatch }, null, false, allocator);
+ if (sliceOffset % 8 != 0)
Assert.True(allocator.Statistics.Allocations > 0);
- Assert.Equal(0,allocator.Rented);
+ Assert.Equal(0, allocator.Rented);
}
}
}
diff --git a/test/Apache.Arrow.Tests/BinaryViewArrayTests.cs b/test/Apache.Arrow.Tests/BinaryViewArrayTests.cs
index 7c18a49..707207f 100644
--- a/test/Apache.Arrow.Tests/BinaryViewArrayTests.cs
+++ b/test/Apache.Arrow.Tests/BinaryViewArrayTests.cs
@@ -33,8 +33,8 @@ public class BinaryViewArrayTests
var slice = (BinaryViewArray)array.Slice(1, 3);
Assert.Equal(3, slice.Length);
- Assert.Equal(new byte[] {3, 4}, slice.GetBytes(0).ToArray());
+ Assert.Equal(new byte[] { 3, 4 }, slice.GetBytes(0).ToArray());
Assert.True(slice.GetBytes(1).IsEmpty);
- Assert.Equal(new byte[] {5, 6}, slice.GetBytes(2).ToArray());
+ Assert.Equal(new byte[] { 5, 6 }, slice.GetBytes(2).ToArray());
}
}
diff --git a/test/Apache.Arrow.Tests/BitUtilityTests.cs b/test/Apache.Arrow.Tests/BitUtilityTests.cs
index 528dca1..3d10bdd 100644
--- a/test/Apache.Arrow.Tests/BitUtilityTests.cs
+++ b/test/Apache.Arrow.Tests/BitUtilityTests.cs
@@ -58,7 +58,7 @@ namespace Apache.Arrow.Tests
Assert.Equal(expectedCount,
BitUtility.CountBits(data, offset));
}
-
+
[Theory]
[InlineData(new byte[] { 0b11111111 }, 0, 8, 8)]
[InlineData(new byte[] { 0b11111111 }, 0, 4, 4)]
@@ -159,7 +159,7 @@ namespace Apache.Arrow.Tests
BitUtility.SetBits(data, index, length, value);
Assert.Equal(expectedValue, data);
}
-
+
[Fact]
public void SetsBitsInRangeOnBigRanges()
{
diff --git a/test/Apache.Arrow.Tests/BooleanArrayTests.cs b/test/Apache.Arrow.Tests/BooleanArrayTests.cs
index efac07d..d2879be 100644
--- a/test/Apache.Arrow.Tests/BooleanArrayTests.cs
+++ b/test/Apache.Arrow.Tests/BooleanArrayTests.cs
@@ -134,10 +134,10 @@ namespace Apache.Arrow.Tests
Assert.False(array.GetValue(0).Value);
Assert.True(array.GetValue(7).HasValue);
Assert.True(array.GetValue(7).Value);
- #pragma warning disable CS0618
+#pragma warning disable CS0618
Assert.False(array.GetBoolean(0));
Assert.True(array.GetBoolean(7));
- #pragma warning restore CS0618
+#pragma warning restore CS0618
}
[Fact]
@@ -200,9 +200,9 @@ namespace Apache.Arrow.Tests
{
Assert.True(array.GetValue(i).HasValue);
Assert.False(array.GetValue(i).Value);
- #pragma warning disable CS0618
+#pragma warning disable CS0618
Assert.False(array.GetBoolean(i));
- #pragma warning restore CS0618
+#pragma warning restore CS0618
}
}
}
diff --git a/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs b/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs
index 0ef8eba..44301f9 100644
--- a/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs
+++ b/test/Apache.Arrow.Tests/CDataInterfacePythonTests.cs
@@ -112,8 +112,8 @@ namespace Apache.Arrow.Tests
.Field(f => f.Name("time64_us").DataType(new Time64Type(TimeUnit.Microsecond)).Nullable(false))
.Field(f => f.Name("time64_ns").DataType(new Time64Type(TimeUnit.Nanosecond)).Nullable(false))
- .Field(f => f.Name("timestamp_ns").DataType(new TimestampType(TimeUnit.Nanosecond, (string) null)).Nullable(false))
- .Field(f => f.Name("timestamp_us").DataType(new TimestampType(TimeUnit.Microsecond, (string) null)).Nullable(false))
+ .Field(f => f.Name("timestamp_ns").DataType(new TimestampType(TimeUnit.Nanosecond, (string)null)).Nullable(false))
+ .Field(f => f.Name("timestamp_us").DataType(new TimestampType(TimeUnit.Microsecond, (string)null)).Nullable(false))
.Field(f => f.Name("timestamp_us_paris").DataType(new TimestampType(TimeUnit.Microsecond, "Europe/Paris")).Nullable(true))
.Field(f => f.Name("list_string").DataType(new ListType(StringType.Default)).Nullable(false))
@@ -627,7 +627,7 @@ namespace Apache.Arrow.Tests
MapArray col10 = (MapArray)recordBatch.Column("col10");
Assert.Equal(5, col10.Length);
- Assert.Equal(new int[] { 0, 0, 1, 2, 4, 10}, col10.ValueOffsets.ToArray());
+ Assert.Equal(new int[] { 0, 0, 1, 2, 4, 10 }, col10.ValueOffsets.ToArray());
Assert.Equal(new long?[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, ((Int64Array)col10.Values).ToList().ToArray());
DurationArray col11 = (DurationArray)recordBatch.Column("col11");
diff --git a/test/Apache.Arrow.Tests/ColumnTests.cs b/test/Apache.Arrow.Tests/ColumnTests.cs
index 2d867b7..38fce6c 100644
--- a/test/Apache.Arrow.Tests/ColumnTests.cs
+++ b/test/Apache.Arrow.Tests/ColumnTests.cs
@@ -46,7 +46,7 @@ namespace Apache.Arrow.Tests
Assert.Equal(20, column.Length);
Assert.Equal(0, column.NullCount);
Assert.Equal(field.DataType, column.Type);
-
+
Column slice5 = column.Slice(0, 5);
Assert.Equal(5, slice5.Length);
Column sliceFull = column.Slice(2);
diff --git a/test/Apache.Arrow.Tests/Decimal256ArrayTests.cs b/test/Apache.Arrow.Tests/Decimal256ArrayTests.cs
index ba0eb5f..1c94916 100644
--- a/test/Apache.Arrow.Tests/Decimal256ArrayTests.cs
+++ b/test/Apache.Arrow.Tests/Decimal256ArrayTests.cs
@@ -54,7 +54,7 @@ namespace Apache.Arrow.Tests
public void AppendThenGetGivesNull()
{
// Arrange
- var builder = new Decimal256Array.Builder(new Decimal256Type(8,2));
+ var builder = new Decimal256Array.Builder(new Decimal256Type(8, 2));
// Act
@@ -95,7 +95,7 @@ namespace Apache.Arrow.Tests
testData[i] = null;
continue;
}
- decimal rnd = i * (decimal)Math.Round(new Random().NextDouble(),10);
+ decimal rnd = i * (decimal)Math.Round(new Random().NextDouble(), 10);
testData[i] = rnd;
builder.Append(rnd);
}
@@ -178,7 +178,7 @@ namespace Apache.Arrow.Tests
{
// Arrange
var builder = new Decimal256Array.Builder(new Decimal256Type(24, 8));
- var range = new decimal[] {2.123M, 1.5984M, -0.0000001M, 9878987987987987.1235407M};
+ var range = new decimal[] { 2.123M, 1.5984M, -0.0000001M, 9878987987987987.1235407M };
// Act
builder.AppendRange(range);
@@ -186,13 +186,13 @@ namespace Apache.Arrow.Tests
// Assert
var array = builder.Build();
- for(int i = 0; i < range.Length; i ++)
+ for (int i = 0; i < range.Length; i++)
{
Assert.Equal(range[i], array.GetValue(i));
Assert.Equal(Convert(range[i]), GetSqlDecimal(array, i));
}
- Assert.Null( array.GetValue(range.Length));
+ Assert.Null(array.GetValue(range.Length));
}
[Fact]
@@ -200,7 +200,7 @@ namespace Apache.Arrow.Tests
{
// Arrange
var builder = new Decimal256Array.Builder(new Decimal256Type(24, 8));
-
+
// Act
builder.Append(1);
builder.Clear();
@@ -234,7 +234,7 @@ namespace Apache.Arrow.Tests
// Arrange
var builder = new Decimal256Array.Builder(new Decimal256Type(24, 8))
.Resize(1);
-
+
// Act
builder.Set(0, 50.123456M);
builder.Set(0, 1.01M);
diff --git a/test/Apache.Arrow.Tests/Extensions/DateTimeOffsetExtensions.cs b/test/Apache.Arrow.Tests/Extensions/DateTimeOffsetExtensions.cs
index 0180973..0b55363 100644
--- a/test/Apache.Arrow.Tests/Extensions/DateTimeOffsetExtensions.cs
+++ b/test/Apache.Arrow.Tests/Extensions/DateTimeOffsetExtensions.cs
@@ -33,6 +33,6 @@ namespace Apache.Arrow.Tests
return dateTimeOffset.AddTicks(-(dateTimeOffset.Ticks % offset.Ticks));
}
-
+
}
}
diff --git a/test/Apache.Arrow.Tests/FixedSizeBinaryArrayTests.cs b/test/Apache.Arrow.Tests/FixedSizeBinaryArrayTests.cs
index abc66d6..a33bb43 100644
--- a/test/Apache.Arrow.Tests/FixedSizeBinaryArrayTests.cs
+++ b/test/Apache.Arrow.Tests/FixedSizeBinaryArrayTests.cs
@@ -39,14 +39,14 @@ public class FixedSizeBinaryArrayTests
.Build();
var arrayData = new ArrayData(
new FixedSizeBinaryType(byteWidth),
- length, nullCount, 0, new [] {validityBuffer, dataBuffer});
+ length, nullCount, 0, new[] { validityBuffer, dataBuffer });
var array = new FixedSizeBinaryArray(arrayData);
var slice = (FixedSizeBinaryArray)array.Slice(1, 3);
Assert.Equal(3, slice.Length);
- Assert.Equal(new byte[] {2, 3}, slice.GetBytes(0).ToArray());
+ Assert.Equal(new byte[] { 2, 3 }, slice.GetBytes(0).ToArray());
Assert.True(slice.GetBytes(1).IsEmpty);
- Assert.Equal(new byte[] {6, 7}, slice.GetBytes(2).ToArray());
+ Assert.Equal(new byte[] { 6, 7 }, slice.GetBytes(2).ToArray());
}
}
diff --git a/test/Apache.Arrow.Tests/IntervalScalarTests.cs b/test/Apache.Arrow.Tests/IntervalScalarTests.cs
index 52c403c..2cc0127 100644
--- a/test/Apache.Arrow.Tests/IntervalScalarTests.cs
+++ b/test/Apache.Arrow.Tests/IntervalScalarTests.cs
@@ -145,7 +145,7 @@ namespace Apache.Arrow.Tests
public void Equality()
{
Assert.Equal(new DayTimeInterval(10, -1), new DayTimeInterval(10, -1));
- Assert.NotEqual(new DayTimeInterval(10, 0), new DayTimeInterval(9, 86400*1000));
+ Assert.NotEqual(new DayTimeInterval(10, 0), new DayTimeInterval(9, 86400 * 1000));
}
[Theory]
diff --git a/test/Apache.Arrow.Tests/LargeListArrayTests.cs b/test/Apache.Arrow.Tests/LargeListArrayTests.cs
index 1d35a8f..9b32ab5 100644
--- a/test/Apache.Arrow.Tests/LargeListArrayTests.cs
+++ b/test/Apache.Arrow.Tests/LargeListArrayTests.cs
@@ -39,7 +39,7 @@ public class LargeListArrayTests
for (int i = 0; i < values.Length; ++i)
{
Assert.Equal(values[i] == null, array.IsNull(i));
- var arrayItem = (Int32Array) array.GetSlicedValues(i);
+ var arrayItem = (Int32Array)array.GetSlicedValues(i);
if (values[i] == null)
{
Assert.Null(arrayItem);
diff --git a/test/Apache.Arrow.Tests/SchemaBuilderTests.cs b/test/Apache.Arrow.Tests/SchemaBuilderTests.cs
index 19c7039..2691e20 100644
--- a/test/Apache.Arrow.Tests/SchemaBuilderTests.cs
+++ b/test/Apache.Arrow.Tests/SchemaBuilderTests.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Types;
using Xunit;
using Xunit.Sdk;
@@ -279,9 +279,9 @@ namespace Apache.Arrow.Tests
public static IEnumerable<object[]> SampleSchema1()
{
- yield return new object[] {"f0", Int32Type.Default, true};
- yield return new object[] {"f1", DoubleType.Default, true};
- yield return new object[] {"f2", Int64Type.Default, false};
+ yield return new object[] { "f0", Int32Type.Default, true };
+ yield return new object[] { "f1", DoubleType.Default, true };
+ yield return new object[] { "f2", Int64Type.Default, false };
}
}
}
diff --git a/test/Apache.Arrow.Tests/StructArrayTests.cs b/test/Apache.Arrow.Tests/StructArrayTests.cs
index ff5e8d2..7cd5da3 100644
--- a/test/Apache.Arrow.Tests/StructArrayTests.cs
+++ b/test/Apache.Arrow.Tests/StructArrayTests.cs
@@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Ipc;
-using Apache.Arrow.Types;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using Apache.Arrow.Ipc;
+using Apache.Arrow.Types;
using Xunit;
namespace Apache.Arrow.Tests
@@ -140,18 +140,18 @@ namespace Apache.Arrow.Tests
var nullBitmap = new ArrowBuffer.BitmapBuilder().AppendRange(true, numRows).Build();
var array = new StructArray(new StructType(fields), numRows, arrays, nullBitmap, nullCount: 0);
- var slicedArray = (StructArray) array.Slice(3, 4);
+ var slicedArray = (StructArray)array.Slice(3, 4);
Assert.Equal(4, slicedArray.Length);
Assert.Equal(2, slicedArray.Fields.Count);
var slicedInts = slicedArray.Fields[0];
- var expectedInts = Enumerable.Range(3, 4).Select(val => (int?) val).ToArray();
- Assert.Equal(expectedInts, (IReadOnlyList<int?>) slicedInts);
+ var expectedInts = Enumerable.Range(3, 4).Select(val => (int?)val).ToArray();
+ Assert.Equal(expectedInts, (IReadOnlyList<int?>)slicedInts);
var slicedDoubles = slicedArray.Fields[1];
- var expectedDoubles = Enumerable.Range(3, 4).Select(val => (double?) (val * 0.1)).ToArray();
- Assert.Equal(expectedDoubles, (IReadOnlyList<double?>) slicedDoubles);
+ var expectedDoubles = Enumerable.Range(3, 4).Select(val => (double?)(val * 0.1)).ToArray();
+ Assert.Equal(expectedDoubles, (IReadOnlyList<double?>)slicedDoubles);
}
[Fact]
@@ -181,24 +181,24 @@ namespace Apache.Arrow.Tests
Assert.Equal(2, array.Fields.Count);
var slicedInts = array.Fields[0];
- var expectedInts = Enumerable.Range(3, 4).Select(val => (int?) val).ToArray();
- Assert.Equal(expectedInts, (IReadOnlyList<int?>) slicedInts);
+ var expectedInts = Enumerable.Range(3, 4).Select(val => (int?)val).ToArray();
+ Assert.Equal(expectedInts, (IReadOnlyList<int?>)slicedInts);
var slicedDoubles = array.Fields[1];
- var expectedDoubles = Enumerable.Range(3, 4).Select(val => (double?) (val * 0.1)).ToArray();
- Assert.Equal(expectedDoubles, (IReadOnlyList<double?>) slicedDoubles);
+ var expectedDoubles = Enumerable.Range(3, 4).Select(val => (double?)(val * 0.1)).ToArray();
+ Assert.Equal(expectedDoubles, (IReadOnlyList<double?>)slicedDoubles);
- var subSlice = (StructArray) array.Slice(1, 2);
+ var subSlice = (StructArray)array.Slice(1, 2);
Assert.Equal(2, subSlice.Length);
Assert.Equal(2, subSlice.Fields.Count);
var subSlicedInts = subSlice.Fields[0];
- var expectedSubSliceInts = Enumerable.Range(4, 2).Select(val => (int?) val).ToArray();
- Assert.Equal(expectedSubSliceInts, (IReadOnlyList<int?>) subSlicedInts);
+ var expectedSubSliceInts = Enumerable.Range(4, 2).Select(val => (int?)val).ToArray();
+ Assert.Equal(expectedSubSliceInts, (IReadOnlyList<int?>)subSlicedInts);
var subSlicedDoubles = subSlice.Fields[1];
- var expectedSubSliceDoubles = Enumerable.Range(4, 2).Select(val => (double?) (val * 0.1)).ToArray();
- Assert.Equal(expectedSubSliceDoubles, (IReadOnlyList<double?>) subSlicedDoubles);
+ var expectedSubSliceDoubles = Enumerable.Range(4, 2).Select(val => (double?)(val * 0.1)).ToArray();
+ Assert.Equal(expectedSubSliceDoubles, (IReadOnlyList<double?>)subSlicedDoubles);
}
private static void TestRoundTripRecordBatch(RecordBatch originalBatch)
diff --git a/test/Apache.Arrow.Tests/TestData.cs b/test/Apache.Arrow.Tests/TestData.cs
index 08ada33..3eede0a 100644
--- a/test/Apache.Arrow.Tests/TestData.cs
+++ b/test/Apache.Arrow.Tests/TestData.cs
@@ -13,12 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Arrays;
-using Apache.Arrow.Scalars;
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Arrays;
+using Apache.Arrow.Scalars;
+using Apache.Arrow.Types;
namespace Apache.Arrow.Tests
{
@@ -757,7 +757,7 @@ namespace Apache.Arrow.Tests
var dayTimeBuilder = new DayTimeIntervalArray.Builder().Reserve(Length);
for (var i = 0; i < Length; i++)
{
- dayTimeBuilder.Append(new DayTimeInterval(100 - 50*i, 100 * i));
+ dayTimeBuilder.Append(new DayTimeInterval(100 - 50 * i, 100 * i));
}
Array = dayTimeBuilder.Build();
break;
@@ -765,7 +765,7 @@ namespace Apache.Arrow.Tests
var monthDayNanoBuilder = new MonthDayNanosecondIntervalArray.Builder().Reserve(Length);
for (var i = 0; i < Length; i++)
{
- monthDayNanoBuilder.Append(new MonthDayNanosecondInterval(i, 5-i, 100*i));
+ monthDayNanoBuilder.Append(new MonthDayNanosecondInterval(i, 5 - i, 100 * i));
}
Array = monthDayNanoBuilder.Build();
break;
diff --git a/test/Apache.Arrow.Tests/TestMemoryAllocator.cs b/test/Apache.Arrow.Tests/TestMemoryAllocator.cs
index 0243c39..ab38f74 100644
--- a/test/Apache.Arrow.Tests/TestMemoryAllocator.cs
+++ b/test/Apache.Arrow.Tests/TestMemoryAllocator.cs
@@ -14,9 +14,9 @@
// limitations under the License.
using System;
-using Apache.Arrow.Memory;
using System.Buffers;
using System.Threading;
+using Apache.Arrow.Memory;
namespace Apache.Arrow.Tests
{
diff --git a/test/Apache.Arrow.Tests/TypeTests.cs b/test/Apache.Arrow.Tests/TypeTests.cs
index c279d69..eea8e92 100644
--- a/test/Apache.Arrow.Tests/TypeTests.cs
+++ b/test/Apache.Arrow.Tests/TypeTests.cs
@@ -13,10 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-using Apache.Arrow.Types;
using System;
using System.Collections.Generic;
using System.Linq;
+using Apache.Arrow.Types;
using Xunit;
using Xunit.Sdk;
diff --git a/test/Apache.Arrow.Tests/UnionArrayTests.cs b/test/Apache.Arrow.Tests/UnionArrayTests.cs
index c603ef6..84c3ab0 100644
--- a/test/Apache.Arrow.Tests/UnionArrayTests.cs
+++ b/test/Apache.Arrow.Tests/UnionArrayTests.cs
@@ -125,7 +125,7 @@ public class UnionArrayTests
Assert.Equal(originalValue, sliceValue);
}
- private static (UnionArray array, bool[] isNull) BuildUnionArray(UnionMode mode, int length, int offset=0)
+ private static (UnionArray array, bool[] isNull) BuildUnionArray(UnionMode mode, int length, int offset = 0)
{
var fields = new Field[]
{