Skip to content

[Parquet] ALP encoder/decoder support - #9372

Open
sdf-jkl wants to merge 80 commits into
apache:mainfrom
sdf-jkl:alp
Open

[Parquet] ALP encoder/decoder support#9372
sdf-jkl wants to merge 80 commits into
apache:mainfrom
sdf-jkl:alp

Conversation

@sdf-jkl

@sdf-jkl sdf-jkl commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

check issue

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions Bot added the parquet Changes to the parquet crate label Feb 7, 2026
@alamb

alamb commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

amaaazing

@sdf-jkl

sdf-jkl commented Feb 20, 2026

Copy link
Copy Markdown
Contributor Author

@alamb I worked with codex on replicating the c++ implementation reviewing commit by commit.

I'll do one final read myself, but this should be ready for initial review.

@alamb

alamb commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Thank you -- I will put this on my short list to reivew I was out last week

@devanbenz devanbenz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments

Comment thread parquet/src/encodings/decoding/alp.rs Outdated
Comment thread parquet/src/encodings/decoding/alp.rs Outdated
Comment thread parquet/src/encodings/decoding/alp.rs Outdated
@sdf-jkl

sdf-jkl commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

@devanbenz Sorry for taking so long to address your comments. I'll make sure to work on it this week!

@alamb

alamb commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

The final spec is

@devanbenz devanbenz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment about header regarding publication of spec.

Comment thread parquet/src/encodings/decoding/alp.rs Outdated
@sdf-jkl

sdf-jkl commented Mar 12, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @devanbenz, I've finally addressed your reviews!

@devanbenz

Copy link
Copy Markdown
Contributor

Thanks @devanbenz, I finally addressed your reviews!

Please cargo fmt the code 🫡

@sdf-jkl

sdf-jkl commented Mar 12, 2026

Copy link
Copy Markdown
Contributor Author

I swear I did 😿
Had to run

cargo fmt -p parquet --  --config skip_children=true `find ./parquet -name "*.rs" \! -name format.rs`

5e5c8d2

@alamb

alamb commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

FWIW I plan to merge this once the upstream parquet-testing PR is merged. I will prod the upstream PR tomorrow at the parquet sync

@sdf-jkl

sdf-jkl commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

added #10785 to update the parquet-testing dep

@sdf-jkl

sdf-jkl commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Added another one with just the pinned rev change - #10786

# Conflicts:
#	parquet-testing
#	parquet/src/encodings/encoding/mod.rs
@sdf-jkl

sdf-jkl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@alamb :shipit:

@alamb

alamb commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@Jefffrey and @etseidl -- do you think it is ok to merge the Rust ALP implementation for inclusion in arrow/parquet 60?

I think we could be one of the first major open source implementations to ship ALP if we did so

(thank you @sdf-jkl for all your work with this)

@alamb

alamb commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

BTW if you want to see a sneak preview of a blog post about what ALP is

@sdf-jkl

sdf-jkl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@alamb @devanbenz thanks for your help 🙏

@etseidl

etseidl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@Jefffrey and @etseidl -- do you think it is ok to merge the Rust ALP implementation for inclusion in arrow/parquet 60?

Yes, I don't see a problem with that. It's in "preview" in the spec, and it requires opt-in from users.

I think we could be one of the first major open source implementations to ship ALP if we did so

(thank you @sdf-jkl for all your work with this)

Yes thanks to all for getting this done so soon!

@Jefffrey

Copy link
Copy Markdown
Contributor

sounds good; i was hoping to take a proper look at this since ive just skimmed it, but kept getting sidetracked by other PRs 😅

@alamb

alamb commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

sounds good; i was hoping to take a proper look at this since ive just skimmed it, but kept getting sidetracked by other PRs 😅

I think we still have some more time until the 60 release -- so we can wait a while to merge it in

@Jefffrey Jefffrey added enhancement Any new improvement worthy of a entry in the changelog api-change Changes to the arrow API labels Aug 31, 2026
@etseidl etseidl added the next-major-release the PR has API changes and it waiting on the next major version label Sep 1, 2026
Jefffrey pushed a commit that referenced this pull request Sep 2, 2026
# Which issue does this PR close?

- Follow-up to #10786, which updated the `parquet-testing` revision.
- No tracking issue yet; one can be added if needed.

# Rationale for this change

The updated `parquet-testing` revision included:

-
[apache/parquet-testing#113](apache/parquet-testing#113):
malformed and edge-case Variant files.
-
[apache/parquet-testing#117](apache/parquet-testing#117):
mark four shredded Variant cases as invalid because they omit required
`value` columns.
-
[apache/parquet-testing#118](apache/parquet-testing#118):
JSON and BSON logical-type files.
-
[apache/parquet-testing#119](apache/parquet-testing#119):
an extended ALP fixture.

#10786 made these fixtures available to Arrow Rust, but did not exercise
the JSON, BSON, or malformed Variant files.

The same revision also added an extended ALP fixture. That fixture is
covered by the ALP encoder/decoder work in #9372, where the required
decoding support exists.

# What changes are included in this PR?

- Read the JSON logical-type fixture and verify all decoded string
values.
- Read the BSON logical-type fixture and verify all decoded binary
values.
- Validate all 14 files under `bad_data/variants`, including the one
valid duplicate-offset case and 13 malformed cases.

The four shredded Variant cases renamed as invalid by the same
`parquet-testing` update are already exercised by the existing Variant
integration harness.

# Are these changes tested?

Yes. The Parquet and Variant integration tests pass locally, along with
formatting and clippy checks. The PR's CI checks are also green.

# Are there any user-facing changes?

No. This PR only adds integration-test coverage for existing
`parquet-testing` fixtures.

# AI usage

This PR was prepared with OpenAI Codex and reviewed by a human. The
integration tests, formatting, and clippy checks described above were
run against the final branch, and the GitHub CI checks passed.

---------

Co-authored-by: cetra3 <cetra3@hotmail.com>
@alamb

alamb commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

I plan to merge this PR tomorrow unless anyone would like more time to review beforehand

@alamb

alamb commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Ignored one new test for MIRI in ea6d049

Followed the same pattern as existing tests that try to use zstd

#[cfg_attr(miri, ignore)] // Zstd calls native C functions unsupported by Miri

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

Labels

api-change Changes to the arrow API enhancement Any new improvement worthy of a entry in the changelog next-major-release the PR has API changes and it waiting on the next major version parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Parquet] Prototype ALP encoding

5 participants