Repository navigation
GH-55287: [C++][Parquet] Write fixed-size lists faster - #55251
MashrafeeAryan wants to merge 17 commits into
Conversation
Compare writing fixed-size lists of floats with writing the same values as a flat column. Test six list sizes with V1 and V2 pages.
Add an encoder helper that writes the same value many times. Check that it produces the same bytes as writing values one at a time.
Write a repeated definition level without first building an array. Add tests for matching bytes and invalid inputs.
Use the fixed list size to write the start and continuation markers. Check that the encoded bytes match the existing encoder.
Skip temporary marker arrays for supported fixed-size lists without nulls. Keep the existing path for other inputs. Test matching output, lower memory use, and fallback cases.
|
|
|
|
|
|
|
|
2 similar comments
|
|
|
|
There was a problem hiding this comment.
Thanks for working on this @MashrafeeAryan! The fast path looks promising. I did a first review.
To fast path optimization I'd add also caching of page levels when we can. I suppose it wouldn't work with CDC (which is rarely used), but it should be make things even faster. See proposed approach here: gist.
Keep the single-list benchmark and add a case that writes two matching V2 pages.
Thank you so much @rok for the review! I implemented the cache and other suggestions as well.
I believe it is ready for another review |
Rationale for this change
While saving fixed-size lists to a Parquet file, it does extra work and takes time. Each value in the list gets a definition level and a repetition level. However, for a list of size n with no nulls, those levels are fully predictable. So we avoid creating markers for definition levels and repetition levels to save time writing fixed-size lists.
What changes are included in this PR?
Are these changes tested?
Yes all of these are tested
Are there any user-facing changes?
Supports fixed-size lists write faster and use less temporary memory.
Was AI used for this PR?
I haves used Codex and Caludef or reviewing and debugging.
PR code and description written by:
Reviewed before submission by:
Related Issue: rok#60