fix: chunked index stream to work around arrow's 2Gb limits#664
Open
kushudai wants to merge 1 commit into
Open
fix: chunked index stream to work around arrow's 2Gb limits#664kushudai wants to merge 1 commit into
kushudai wants to merge 1 commit into
Conversation
Contributor
|
ACTION NEEDED The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
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.
Chunk BTree index Arrow handoff to stay under Arrow's 2 GiB offset cap
What
VectorSchemaRoot. A value column exceeding 2 GiB overflows Arrow's 32-bit-offsetVarChar/VarBinarybuffer during accumulation.ArrowBatchChunker: accumulates rows into multiple narrow batches, rolling before any var-width column's data buffer crosses the 2 GiB cap (plus a row-count ceiling so fixed-width/offset buffers stay under it). Fails fast on a single value over the cap.ChunkedArrowReader:SingleBatchArrowReadergeneralized to emit N pre-built batches; caller owns/closes them.buildForFragmentGroupto chunked accumulation. lance-core re-zones the multi-batch stream, so the built index is identical to a single-batch handoff; peak memory is unchanged.Notes
withPreprocessedData); FTS/zonemap/fragment-BTree read from the dataset directly and never buffer aVectorSchemaRoot.Test plan
ArrowBatchChunkerSuite(byte-budget split, single batch, over-budget isolation, fixed-width row cap, order/content) andChunkedArrowReaderSuite(ordered emission, exhaustion).AddIndexTestrange-mode — create, repeat/replace,rows_per_range, index-details — all pass.spotless:apply+checkstyle:checkclean.