add duckdb_append_value to C API #15065
Merged
+409
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
duckdb_append_valueto the C API.I also added new C API tests of this function for all value types that it is currently possible to create. Six types don't yet have value-creation functions in the C API:
A PR exists to add value-creation functions for MAP and UNION. I plan to work on adding support for the other four types in the near future. I also plan to fill in the append-value test cases for these types after the necessary value-creation functions are added.
To enable the new tests, I added a few helpers to the C API tester:
duckdb_fetch_chunkinstead of one of the deprecated chunk-fetching functions.The new tests use direct access to the vectors instead of the C API tester's "Fetch" methods. This is because the "Fetch" methods use a (deprecated) path that doesn't support all types (
DeprecatedMaterializeResult).