8000 Add support for Map writing to Arrow vtab by sgrebnov · Pull Request #439 · duckdb/duckdb-rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for Map writing to Arrow vtab #439

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

Merged
merged 3 commits into from
Feb 24, 2025

Conversation

sgrebnov
Copy link
Contributor
@sgrebnov sgrebnov commented Feb 18, 2025

PR adds support for writing Map Arrow data type to Arrow vtab.

MapArray is physically implemented as a ListArray of structs with key and value fields, and support for this can be added using list_vector and struct_array_to_vector.

While working on large Map arrays, I discovered that StructVector.child must adjust its vector capacity similarly to ListVector.child; otherwise it can reach array capacity ("assertion failed: array.len() <= out.capacity()"). Improved.

Note: the lint error is unrelated to this change and due to recently released rust version 1.85 / 2025-02-17 that automatically applied to the CI (requires improvement in crates/duckdb/src/r2d2.rs:118:31)

@sgrebnov sgrebnov force-pushed the sgrebnov/map-support branch 2 times, most recently from 27fc6c8 to ccaaac0 Compare February 24, 2025 02:04
@sgrebnov sgrebnov force-pushed the sgrebnov/map-support branch from ccaaac0 to 0c75302 Compare February 24, 2025 02:04
@Maxxen Maxxen merged commit 1096461 into duckdb:main Feb 24, 2025
3 checks passed
@Maxxen
Copy link
Member
Maxxen commented Feb 24, 2025

Thanks a lot for the PR! LGTM

sgrebnov added a commit to spiceai/duckdb-rs that referenced this pull request Feb 25, 2025
lukekim pushed a commit to spiceai/duckdb-rs that referenced this pull request Feb 25, 2025
peasee pushed a commit to spiceai/duckdb-rs that referenced this pull request Mar 17, 2025
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
0