duckdb-rs icon indicating copy to clipboard operation
duckdb-rs copied to clipboard

Added union type support in arrow feature

Open Swoorup opened this issue 1 year ago • 0 comments

This adds an MVP support for union types for use in appender via arrows. The insertion works fine currently for primitive and string types (more types can be added in the future).

However the retrieval is failing, possibly due to https://github.com/duckdb/duckdb/pull/11326 ?

ok: CDataInterface("The datatype \"Union([(0, Field { name: \"num\", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), (1, Field { name: \"str\", data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} })], Sparse)\" expects 1 buffer, but requested 1. Please verify that the C data interface is correctly implemented.")

Thanks @Tishj for giving me pointers.

Swoorup avatar Mar 25 '24 14:03 Swoorup