Skip to content

[WIP][POC] Pgaur on pair evaluation - #50791

Draft
prtkgaur wants to merge 14 commits into
apache:mainfrom
prtkgaur:pgaurOnPairEvaluation
Draft

prtkgaur wants to merge 14 commits into
apache:mainfrom
prtkgaur:pgaurOnPairEvaluation

Conversation

@prtkgaur

@prtkgaur prtkgaur commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for opening a pull request!

If this is your first pull request you can find detailed information on how to contribute here:

Please remove this line and the above text before creating your pull request.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

This PR includes breaking changes to public APIs. (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)

This PR contains a "Critical Fix". (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format.

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

After updating the title, you can mark the pull request as ready for review.

See also:

ArnavBalyan and others added 14 commits October 4, 2026 04:56
Add the FSST sources, license, notice, and release-audit metadata required to
build Parquet support from a pinned in-tree implementation.
Encode BYTE_ARRAY pages with FSST and serialize exported decoder tables and
lengths in a bounded little-endian layout. Add reader, writer, metadata, Python,
malformed-input, and round-trip coverage for the experimental encoding.
Train bounded token dictionaries, greedily encode strings, and decode
rows at arbitrary offsets. Preserve binary input, configurable
dictionary budgets, bit-packed codes, and explicit bounds for malformed
inputs and output buffers.
Split each string into a group prefix and suffix before FSST or OnPair
sees the data. Keep reconstruction row-addressable and cover empty
groups, binary input, and boundaries between prefix groups.
Measure projected size, encoding, full-column decoding, and row access
for FSST, OnPair, and prefix variants over shared generated corpora.
Validate decoded bytes before timing and keep parameter selection
outside reported codec work.
Compare native Parquet pages and projected FSST and OnPair payloads with
optional generic compression, including dictionary-then-OnPair. Separate
parameter selection from timed encoding and verify every decoded column.
Exercise dictionary budgets from 9 through 16 and isolate packed-code
width from dictionary contents in a dedicated benchmark. Fail on any
round-trip mismatch and cover each remainder left by grouped decoding.
Build a decode-only dictionary with fixed token slots so each lookup
needs one random payload access. Leave the compact stored dictionary
unchanged and retain portable, short-stream, and caller-prebuilt paths.
Unroll packed decoding by a multiple of each width's byte-alignment
period so offsets and shifts remain constant within a group. Preserve
scalar tails and cover every possible group remainder.
Train FSST with sparse pair counts and 16-byte symbols, then encode
through the shared OnPair parser and decoder. This isolates table
construction while keeping tokenization, packing, and row reconstruction
identical.
Seed literal tokens only for bytes present in the column and dispatch
every resulting code width. Preserve complete token coverage, bounded
dictionary capacity, and round trips for narrow alphabets.
Train candidate budgets and choose the smallest projected decode time
within a bounded compression regression. Validate policy inputs,
deterministic ties, fallbacks, and selection across corpus shapes.
Validate configurations, offsets, tokens, dictionaries, packed streams,
selector policies, and output capacities before use. Propagate explicit
sizes through every caller and retain malformed-input, sanitizer, and
remainder coverage.
Compile the maintained OnPair support library, five standalone tests,
and two benchmarks through Arrow's build. Keep raw fitting programs on
the research branch and leave the evaluation library uninstalled.
@prtkgaur
prtkgaur force-pushed the pgaurOnPairEvaluation branch 2 times, most recently from 880c425 to 53149d6 Compare October 4, 2026 19:35
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.

3 participants