Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
343 stars 62 forks source link

Structs not supported? #87

Closed EvanMachusak closed 8 months ago

EvanMachusak commented 1 year ago

I am trying to use ADO.NET to query a table whose schema contains:

column_name: code column_type: STRUCT(coding STRUCT(code VARCHAR, display VARCHAR, "system" VARCHAR)[], sof_codes VARCHAR[], "text" VARCHAR)

I've tried every reasonable variation of select statement that should work to extract columns out of that struct, e.g.

SELECT code.coding.code FROM ...
SELECT code.* FROM ...

The data types in question for these columns are 24 and 25, which are not supported. This exception gets raised:

https://github.com/Giorgi/DuckDB.NET/blob/58a3bc90e5446ddfca998da5817ed115170fa202/DuckDB.NET.Data/DuckDBDataReader.cs#L122

These schemas come from parquet files, if that matters.

Giorgi commented 1 year ago

No, structs and lists aren't supported currently.

EvanMachusak commented 1 year ago

Would you entertain a PR for it?

Giorgi commented 1 year ago

I'll be happy to review it but I think you can't implement it without #77

OneCyrus commented 9 months ago

now that data chunks are implemented. any chance we get struct support?

Giorgi commented 9 months ago

Yes, I plan to work on adding struct support but first I plan to implement #135

Giorgi commented 9 months ago
Giorgi commented 8 months ago

Structs are now working in the develop branch.

Giorgi commented 8 months ago

For now, I won't implement any naming customization.

Giorgi commented 8 months ago

Struct support is now live on NuGet

EvanMachusak commented 7 months ago

Thanks Giorgi. This is really great.