Skip to content

Update typemap for Duckdb v0.10.1#28

Merged
cnuernber merged 3 commits intotechascent:mainfrom
rschmukler:rschmukler/fix-duckdb-types
Apr 6, 2024
Merged

Update typemap for Duckdb v0.10.1#28
cnuernber merged 3 commits intotechascent:mainfrom
rschmukler:rschmukler/fix-duckdb-types

Conversation

@rschmukler
Copy link
Contributor

@rschmukler rschmukler commented Apr 3, 2024

This commit reverts the breaking type mapping definitions that the duckdb team introduced in v0.10.0 and switches them to how they do them in v0.10.1 / v0.9.2. ie. They realized that they broke all C-based APIs and undid the UHUGEINT insertion.

In here is also a bit of a refactor that tries to get some of the DRYness of the define-long-enums while also mimicking the new style of the C api (where they use explicit mappings on enums). See this pull request for details. I think this strikes a nice balance between clarity and DRYness.

Lastly we now only error on version v0.10.0 since this should restore compatibility with v0.9.2. I confirmed that the test suite passes when using duckdb v0.9.2 via nix flakes.

fix: update typemaps to duckdb v0.10.1

This commit reverts the breaking type mapping definitions that the
duckdb team introduced in `v0.10.0` and switches them to how they do
them in `v0.10.1` / `v0.9.2`. ie. They realized that they broke all
C-based APIs and undid the UHUGEINT insertion.

In here is also a bit of a refactor that tries to get some of the
DRYness of the `define-long-enums` while also mimicking the new style of
the C api (where they use explicit mappings on enums). See [this pull
request](duckdb/duckdb#10649) for details. I
think this strikes a nice balance between clarity and DRYness.

Lastly we now only error on version `v0.10.0` since this should restore
compatibility with `v0.9.2`. I confirmed that the test suite passes when
using duckdb `v0.9.2` via nix flakes.
Add duckdb to the devShell in the nix flake so that we can easily test
different versions of Duckdb
Get the latest version of duckdb
@rschmukler rschmukler force-pushed the rschmukler/fix-duckdb-types branch from 82fc1cd to 217c4e2 Compare April 3, 2024 22:40
@harold
Copy link
Contributor

harold commented Apr 3, 2024

Glad to see this, adding to the middle of the enum struck me as a bit of a noob mistake. Definitely appreciate your efforts!

@cnuernber cnuernber merged commit 49622e7 into techascent:main Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants