Skip to content

Commit 5a5ad53

Browse files
committed
Refactoring
1 parent 7ca5f92 commit 5a5ad53

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

DuckDB.NET.Data/DuckDBAppender.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ namespace DuckDB.NET.Data;
99

1010
public class DuckDBAppender : IDisposable
1111
{
12-
private static readonly ulong DuckDBVectorSize = DuckDBGlobalData.VectorSize;
13-
1412
private bool closed;
1513
private readonly Native.DuckDBAppender nativeAppender;
1614
private readonly string qualifiedTableName;
@@ -48,7 +46,7 @@ public DuckDBAppenderRow CreateRow()
4846
throw new InvalidOperationException("Appender is already closed");
4947
}
5048

51-
if (rowCount % DuckDBVectorSize==0)
49+
if (rowCount % DuckDBGlobalData.VectorSize == 0)
5250
{
5351
AppendDataChunk();
5452

@@ -104,7 +102,7 @@ private void InitVectorWriters()
104102

105103
if (vectorWriters[index] == null)
106104
{
107-
vectorWriters[index] = VectorDataWriterFactory.CreateWriter(vector, logicalTypes[index]);
105+
vectorWriters[index] = VectorDataWriterFactory.CreateWriter(vector, logicalTypes[index]);
108106
}
109107
else
110108
{

DuckDB.NET.Data/Internal/DuckDBGlobalData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace DuckDB.NET.Data.Internal;
44

5-
public static class DuckDBGlobalData
5+
internal static class DuckDBGlobalData
66
{
77
public static ulong VectorSize { get; } = NativeMethods.Helpers.DuckDBVectorSize();
88
}

0 commit comments

Comments
 (0)