Skip to content

Commit 668c65e

Browse files
committed
Throw exception for unsupported types.
1 parent 18a5ce8 commit 668c65e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

DuckDB.NET.Data/Internal/Writer/VectorDataWriterFactory.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using DuckDB.NET.Data.Internal.Reader;
32
using DuckDB.NET.Native;
43

54
namespace DuckDB.NET.Data.Internal.Writer;
@@ -16,14 +15,20 @@ public static unsafe VectorDataWriterBase CreateWriter(IntPtr vector, DuckDBLogi
1615
DuckDBType.Uuid => new GuidVectorDataWriter(vector, dataPointer, columnType),
1716
DuckDBType.Date => new DateTimeVectorDataWriter(vector, dataPointer, columnType),
1817
DuckDBType.Time => new DateTimeVectorDataWriter(vector, dataPointer, columnType),
18+
DuckDBType.TimeTz => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
1919
DuckDBType.Interval => new IntervalVectorDataWriter(vector, dataPointer, columnType),
2020
DuckDBType.Timestamp => new DateTimeVectorDataWriter(vector, dataPointer, columnType),
2121

2222
DuckDBType.Boolean => new BooleanVectorDataWriter(vector, dataPointer, columnType),
2323

24+
DuckDBType.Map => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
25+
DuckDBType.List => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
26+
DuckDBType.Array => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
2427
DuckDBType.Blob => new StringVectorDataWriter(vector, dataPointer, columnType),
2528
DuckDBType.Varchar => new StringVectorDataWriter(vector, dataPointer, columnType),
26-
29+
DuckDBType.Bit => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
30+
DuckDBType.Enum => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
31+
DuckDBType.Struct => throw new NotImplementedException($"Writing {columnType} to data chunk is not yet supported"),
2732
DuckDBType.Decimal => new DecimalVectorDataWriter(vector, dataPointer, logicalType, columnType),
2833
DuckDBType.TimestampS => new DateTimeVectorDataWriter(vector, dataPointer, columnType),
2934
DuckDBType.TimestampMs => new DateTimeVectorDataWriter(vector, dataPointer, columnType),

0 commit comments

Comments
 (0)