diff --git a/DuckDB.NET.Data/Internal/Writer/ListVectorDataWriter.cs b/DuckDB.NET.Data/Internal/Writer/ListVectorDataWriter.cs index 64918e8e..d64d04c9 100644 --- a/DuckDB.NET.Data/Internal/Writer/ListVectorDataWriter.cs +++ b/DuckDB.NET.Data/Internal/Writer/ListVectorDataWriter.cs @@ -33,33 +33,54 @@ internal override bool AppendCollection(ICollection value, int rowIndex) _ = value switch { IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), #if NET6_0_OR_GREATER IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), #endif IEnumerable items => WriteItems(items), + IEnumerable items => WriteItems(items), _ => WriteItems((IEnumerable)value) }; diff --git a/DuckDB.NET.Test/DuckDBManagedAppenderListTests.cs b/DuckDB.NET.Test/DuckDBManagedAppenderListTests.cs index ba5209a0..6338c3fe 100644 --- a/DuckDB.NET.Test/DuckDBManagedAppenderListTests.cs +++ b/DuckDB.NET.Test/DuckDBManagedAppenderListTests.cs @@ -129,9 +129,15 @@ public void ArrayValuesInt() ListValuesInternal("Integer", faker => faker.Random.Int(), 5); } + [Fact] + public void ListValuesNullableDouble() + { + ListValuesInternal("Double", faker => faker.Random.Double().OrNull(faker)); + } + private void ListValuesInternal(string typeName, Func generator, int? length = null) { - var rows = 2000; + var rows = 10; var table = $"managedAppenderLists"; var columnLength = length.HasValue ? length.Value.ToString() : "";