Skip to content

GH-55287: [C++][Parquet] Write fixed-size lists faster - #55251

Draft
MashrafeeAryan wants to merge 6 commits into
apache:mainfrom
MashrafeeAryan:fast-path-fixed-list
Draft

MashrafeeAryan wants to merge 6 commits into
apache:mainfrom
MashrafeeAryan:fast-path-fixed-list

Conversation

@MashrafeeAryan

@MashrafeeAryan MashrafeeAryan commented Oct 25, 2026 •

Copy link
Copy Markdown

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?

  • Added a fast writing path for fixed-size lists
  • Encode definition and repetition levels directly without building temporary marker arrays
  • Calculate row counts and levels using the list size
  • Keep the existing writing part for unsupported cases
  • Add a benchmark to compare fixed-size-list writes with flat columns to show how much extra work writing lists used to add
  • Add tests to check byte-identical output

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:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Related Issue: rok#60

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.
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #34510 has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #34510 has been automatically assigned in GitHub to PR creator.

@MashrafeeAryan MashrafeeAryan changed the title GH-34510: [C++][Parquet] Write fixed-size lists faster GH-55287: [C++][Parquet] Write fixed-size lists faster Oct 27, 2026
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55287 has been automatically assigned in GitHub to PR creator.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55287 has no components, please add labels for components.

2 similar comments
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55287 has no components, please add labels for components.

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #55287 has no components, please add labels for components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant