From c5c104ce72238e25ac950a41a46974ff8651316a Mon Sep 17 00:00:00 2001 From: jeadie Date: Mon, 3 Jun 2024 20:57:13 +1000 Subject: [PATCH] add support for DuckDB arrays when using Arrow's FixedSizeList --- src/vtab/arrow.rs | 4 ++-- src/vtab/logical_type.rs | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vtab/arrow.rs b/src/vtab/arrow.rs index 3d6c23c2..bde98c5d 100644 --- a/src/vtab/arrow.rs +++ b/src/vtab/arrow.rs @@ -196,8 +196,8 @@ pub fn to_duckdb_logical_type(data_type: &DataType) -> Result Self { + unsafe { + Self { + ptr: duckdb_create_array_type(child_type.ptr, array_size), + } + } + } + /// Creates a decimal type from its `width` and `scale`. pub fn decimal(width: u8, scale: u8) -> Self { unsafe {