Repository navigation
arrow: import Arrow C Stream batches - #147
Merged
Merged
Conversation
Add lancedb_record_batch_reader_from_arrow_stream() for the write side of #129. It moves a validated ArrowArrayStream into a LanceDBRecordBatchReader, acquires the schema once, pulls batches lazily, and preserves producer schema and read errors, including a NULL get_last_error result. Validate required callbacks before taking ownership, clear the source release pointer, and release the producer exactly once after the move, including schema failure. Reject top-level struct null rows before extracting child columns, because a RecordBatch cannot represent them. Document the accepted RecordBatch shape and independent stream, schema and array ownership. Declare the standard Arrow C Data and Stream structures behind the shared inclusion guards, keep Doxygen from emitting duplicate typedef structs, and teach the ABI checker to resolve separate struct/typedef declarations. Add real C++ multi-batch create/add/merge coverage plus focused ownership, error and root-null fixtures. This replacement is based on actual main 55cd8a6 and retains the original #144 tests, headers, ABI checker and Delta/DML integration. Refs #144 Refs #129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ready replacement for #144, rebuilt as one clean commit on actual main
55cd8a6. The oldxuanwo/arrow-c-stream-importbranch and #144 are left untouched.lancedb_record_batch_reader_from_arrow_stream()for the write side of query: support Arrow C Data Stream (ArrowArrayStream) for streaming reads and writes #129. It moves a validatedArrowArrayStreaminto an existingLanceDBRecordBatchReader, acquires the schema once, pulls batches lazily, and preserves producer schema and read errors, including a NULLget_last_errorresult.The new root-null fixture now builds a consistent validity bitmap (all rows valid, only row zero cleared), runs
ValidateFull(), and uses a local RAII table owner plus diagnostics so a failure reports its own cause and cleans up under Valgrind.Tests
ExportRecordBatchReadermulti-batch data through table create, add and merge, checking actual row values.get_last_error, and zero-row batches.Validation
cargo check --package lancedb-ccargo fmt --checkx86_64-pc-windows-msvc(177 extern functions, 34 public structs, 7 shared enums)test_arrow_stream.cppsyntax checkdocstarget with Doxygen/Sphinx-WRefs #144
Refs #129