Skip to content

Conversation

@jraymakers
Copy link
Contributor

@jraymakers jraymakers commented Nov 30, 2024

Add duckdb_append_value to 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:

  • DECIMAL
  • MAP
  • UUID
  • UNION
  • BIT
  • VARINT

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:

  • Get a chunk using duckdb_fetch_chunk instead of one of the deprecated chunk-fetching functions.
  • Get the child vectors for LIST, STRUCT, or ARRAY vectors.

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).

@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 1, 2024 00:13
@jraymakers jraymakers marked this pull request as ready for review December 1, 2024 00:13
@Mytherin Mytherin merged commit ea8ad42 into duckdb:main Dec 1, 2024
42 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Dec 1, 2024

Thanks!

krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Dec 27, 2024
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Dec 27, 2024
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request Dec 27, 2024
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Dec 28, 2024
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Dec 28, 2024
add duckdb_append_value to C API (duckdb/duckdb#15065)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
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.

2 participants