-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C-API] Add struct list_entry, ListVector::reserve and ListVector::set_size #6155
Conversation
Hi, @Tishj, the GHA failure seems to be irrelevant. Would you mind to help to re-trigger the jobs? Thanks! |
Thanks for the PR! Looks good. Could we perhaps also add some tests to |
src/main/capi/data_chunk-c.cpp
Outdated
@@ -128,6 +128,22 @@ idx_t duckdb_list_vector_get_size(duckdb_vector vector) { | |||
return duckdb::ListVector::GetListSize(*v); | |||
} | |||
|
|||
void duckdb_list_vector_set_size(duckdb_vector vector, idx_t size) { | |||
if (!vector) { | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this doesn't have a desired return value, could we perhaps make it a duckdb_state
so we can indicate that the input was faulty instead of silently returning?
Same goes for the duckdb_list_vector_reserve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing. will do.
Thanks for the fixes! It looks like the newly added test is failing, however. Could you have a look? |
@Mytherin yes, sorry was busy last few days. i will keep working on this to get it through. |
@Mytherin could you take a look? The ODBC build failure is not relevant. |
Thanks! |
A few changes were made in v0.7.0 of duckdb that impacted this extension: - list_vector changes were merged in duckdb/duckdb#6155 - JSON type was removed duckdb/duckdb#6288 - Some function signatures were changedd
* Fixes #567 A few changes were made in v0.7.0 of duckdb that impacted this extension: - list_vector changes were merged in duckdb/duckdb#6155 - JSON type was removed duckdb/duckdb#6288 - Some function signatures were changedd * Trigger Build
This PR allows construct and modify a
ListVector
from the C API, as well as the integration from other languages, i.e., Rust.The motivation was discussed in #6152