perf(parquet/pqarrow): build nullable fixed-size list children directly - #1195
Draft
fallintoplace wants to merge 1 commit into
Draft
perf(parquet/pqarrow): build nullable fixed-size list children directly#1195fallintoplace wants to merge 1 commit into
fallintoplace wants to merge 1 commit into
Conversation
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
Why
Parquet does not write child values for null fixed-size-list parents. Arrow still needs
list_sizechild slots for every parent, so the reader has to add null child values.The old nullable path creates one temporary array for each validity run and concatenates them. Alternating validity can therefore create one temporary array per parent row.
Benchmark
Apple M1 Pro, 65,536
FixedSizeList<int32, 4>parents:The low-run path is kept for the clustered case, where creating a single pair of slices is cheaper than building an index array.
Tests
go vet ./parquet/pqarrowgo test -race ./parquet/pqarrow -run 'TestBuildFixedSizeListArray|TestParquetArrowIO/TestFixedSizeList'PARQUET_TEST_DATA=parquet-testing/data ARROW_TEST_DATA=arrow-testing/data go test ./...