Skip to content
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

Merged
merged 7 commits into from
Feb 12, 2023

Conversation

eddyxu
Copy link
Contributor

@eddyxu eddyxu commented Feb 8, 2023

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

@eddyxu
Copy link
Contributor Author

eddyxu commented Feb 9, 2023

Hi, @Tishj, the GHA failure seems to be irrelevant. Would you mind to help to re-trigger the jobs? Thanks!

@Mytherin
Copy link
Collaborator

Mytherin commented Feb 9, 2023

Thanks for the PR! Looks good. Could we perhaps also add some tests to test/api/capi/test_capi_data_chunk.cpp?

@@ -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;
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing. will do.

@Mytherin
Copy link
Collaborator

Thanks for the fixes! It looks like the newly added test is failing, however. Could you have a look?

@eddyxu
Copy link
Contributor Author

eddyxu commented Feb 11, 2023

@Mytherin yes, sorry was busy last few days. i will keep working on this to get it through.

@eddyxu
Copy link
Contributor Author

eddyxu commented Feb 12, 2023

@Mytherin could you take a look? The ODBC build failure is not relevant.

@Mytherin Mytherin merged commit fc11c15 into duckdb:master Feb 12, 2023
@Mytherin
Copy link
Collaborator

Thanks!

dacort added a commit to dacort/lance that referenced this pull request Feb 18, 2023
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
changhiskhan pushed a commit to lancedb/lance that referenced this pull request Feb 18, 2023
* 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
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.

None yet

3 participants