Skip to content

Add explicit numbering to C enums + various compilation/CI fixes#10649

Merged
Mytherin merged 8 commits intoduckdb:mainfrom
Mytherin:explicitenumnumbers
Feb 14, 2024
Merged

Add explicit numbering to C enums + various compilation/CI fixes#10649
Mytherin merged 8 commits intoduckdb:mainfrom
Mytherin:explicitenumnumbers

Conversation

@Mytherin
Copy link
Collaborator

Fixes #10634

@Mytherin Mytherin changed the title Add explicit numbering to C enums + various compilation fixes Add explicit numbering to C enums + various compilation/CI fixes Feb 14, 2024
@Tishj
Copy link
Contributor

Tishj commented Feb 14, 2024

@Mytherin i made a python script that uses clang to analyze the enums in duckdb.h to ensure they have values explicitly assigned and that they are all unique

I already linked my draft PR in the internal issue

@Mytherin
Copy link
Collaborator Author

Sounds good. Perhaps you can add that script to the CI in a separate PR?

@Giorgi
Copy link
Contributor

Giorgi commented Feb 14, 2024

I think you should also update DuckDBColumnType.java and ctypes.jl not to break Java and Julia clients.

@github-actions github-actions bot marked this pull request as draft February 14, 2024 09:54
@Mytherin Mytherin marked this pull request as ready for review February 14, 2024 09:54
@Mytherin Mytherin merged commit e0d1810 into duckdb:main Feb 14, 2024
@Mytherin Mytherin deleted the explicitenumnumbers branch February 14, 2024 14:53
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Mar 15, 2024
Merge pull request duckdb/duckdb#10658 from hannes/csvpathlength
Merge pull request duckdb/duckdb#10756 from Mytherin/preserveinsertionordermemory
Merge pull request duckdb/duckdb#10746 from samansmink/enable-azure-autoload
Merge pull request duckdb/duckdb#10747 from maiadegraaf/list_reverse_bug
Merge pull request duckdb/duckdb#10748 from taniabogatsch/capi-tests
Merge pull request duckdb/duckdb#10739 from peterboncz/pb/immmedate_mode_only_in_non_autocommit
Merge pull request duckdb/duckdb#10688 from Tmonster/union_exclude
Merge pull request duckdb/duckdb#10710 from samansmink/comment-on-column
Merge pull request duckdb/duckdb#10725 from hawkfish/fuzzer-preceding-frame
Merge pull request duckdb/duckdb#10723 from hawkfish/fuzzer-null-timestamp
Merge pull request duckdb/duckdb#10436 from taniabogatsch/map-fixes
Merge pull request duckdb/duckdb#10587 from kryonix/main
Merge pull request duckdb/duckdb#10738 from TinyTinni/fix-assert-in-iscntrl
Merge pull request duckdb/duckdb#10708 from carlopi/ci_fixes
Merge pull request duckdb/duckdb#10726 from hawkfish/fuzzer-to-weeks
Merge pull request duckdb/duckdb#10727 from hawkfish/fuzzer-window-bind
Merge pull request duckdb/duckdb#10733 from TinyTinni/remove-static-string
Merge pull request duckdb/duckdb#10715 from Tishj/python_tpch_regression_rework
Merge pull request duckdb/duckdb#10728 from hawkfish/fuzzer-argminmax-decimal
Merge pull request duckdb/duckdb#10717 from carlopi/fix_extension_deploy
Merge pull request duckdb/duckdb#10694 from Mytherin/castquerylocation
Merge pull request duckdb/duckdb#10448 from peteraisher/feature/use-assertThrows-for-jdbc-tests
Merge pull request duckdb/duckdb#10691 from Mytherin/issue10685
Merge pull request duckdb/duckdb#10684 from Mytherin/distincton
Merge pull request duckdb/duckdb#9539 from Tishj/timestamp_unit_to_tz
Merge pull request duckdb/duckdb#10341 from Tmonster/tpch_ingestion_benchmark
Merge pull request duckdb/duckdb#10689 from Mytherin/juliaversion
Merge pull request duckdb/duckdb#10669 from Mytherin/skippedtests
Merge pull request duckdb/duckdb#10679 from Tishj/reenable_window_rows_overflow
Merge pull request duckdb/duckdb#10672 from carlopi/wasm_extensions_ci
Merge pull request duckdb/duckdb#10660 from szarnyasg/update-storage-info-for-v0100
Merge pull request duckdb/duckdb#10643 from bleskes/duck_transaction_o11y
Merge pull request duckdb/duckdb#10654 from carlopi/fix_10548
Merge pull request duckdb/duckdb#10650 from hannes/noprintf
Merge pull request duckdb/duckdb#10649 from Mytherin/explicitenumnumbers
rschmukler added a commit to rschmukler/tmducken that referenced this pull request Apr 3, 2024
This commit reverts the type mapping definitions that the duckdb team
reintroduced in `v0.10.1`. 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.
rschmukler added a commit to rschmukler/tmducken that referenced this pull request Apr 3, 2024
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.
cnuernber pushed a commit to techascent/tmducken that referenced this pull request Apr 6, 2024
* fix: update typemaps to duckdb v0.10.1

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.

* chore: add duckdb to nix flake devShell

Add duckdb to the devShell in the nix flake so that we can easily test
different versions of Duckdb

* chore: update nix flake to duckdb v0.10.1

Get the latest version of duckdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DUCKDB_TYPE_UHUGEINT breaks compatibility with C api clients

3 participants