Giorgi / DuckDB.NET

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

Support for DUCKDB_TYPE_UUID #60

Closed unconverged closed 9 months ago

unconverged commented 1 year ago

DuckDb allows for UUID columns and provides a built-in data type, DUCKDB_TYPE_UUID, to handle such columns. However, there are some strange things. We have a value of UUID type. DuckDB identifies the value as UUID. The docs indicate that UUID is actually a duckdb_hugeint (128 bit integer), but when we try getting this value as a HugeInt, we get 0. When we try getting the same value as a string, we get an empty string. Something's wrong here, we need to investigate.

Conversion higeint->double and vice versa works fine. If we have a real hugeint (SELECT 125::HUGEINT; ) it also works fine (we get a value with lower part set to 125), so apparently the problem is in UUID handling.

duckdb/duckdb#4457