Repository navigation
feat(cuda-ffi): preserve dictionaries in per-schema device batches - #11421
Conversation
Add a native scan iterator with an independently owned Arrow schema and CUDA array per batch. Keep the fixed-schema decoded stream unchanged, and cover ownership, varying encodings, projection, nulls, and terminal errors. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
|
@claude review |
|
Claude finished @0ax1's task in 2m 1s —— View job Review of PR #11421: dictionary-preserving per-batch device export
Verdict: I found no correctness bugs. The API is small and follows the existing FFI conventions. The comments are only nits and a consistency question. What I checked
Suggestions (non-blocking)
TestsThe 10 tests cover the important edges:
The tests read device buffers back through the public ABI rather than Rust helpers, which suits an FFI contract. I did not run clippy or the tests (they need a CUDA device, and the repo guidance leaves verification to the user). |
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Merging this PR will regress 1 benchmark2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Summary
First of two stacked drafts: expose dictionary-preserving GPU batches so consumers can postpone string expansion until after combining batches. This PR adds the export API only; the companion PR #11422 adds an optional cuDF materialization helper and reports the ~20% end-to-end hot-read gain.
A fixed-schema Arrow device stream cannot describe batches whose dictionary encodings or index widths differ. The new iterator returns an independently owned schema and device array for each batch, using the existing
DictionaryExport::Preservepolicy.Changes
vx_cuda_scan_path_device_batches,vx_cuda_device_batches_next, andvx_cuda_device_batches_free.