Skip to content

GH-53615: [C++][Parquet] Add ALP to file-level fuzz corpus - #53671

Merged
pitrou merged 1 commit into
apache:mainfrom
wgtmac:codex/gh-53615-alp-fuzz-corpus
Oct 14, 2026
Merged

pitrou merged 1 commit into
apache:mainfrom
wgtmac:codex/gh-53615-alp-fuzz-corpus

Conversation

@wgtmac

@wgtmac wgtmac commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

Follow up on #48345 by including ALP in the generated Parquet file-level fuzz corpus.

What changes are included in this PR?

Add Encoding::ALP to kFloatEncodings.

Are these changes tested?

N/A.

Are there any user-facing changes?

No. This only changes fuzzing seed generation, not production reader or writer behavior.

Was AI used for this PR?

AI prepared and reviewed the one-line change and the PR description.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Closes #53615.

@wgtmac
wgtmac requested review from HuaHuaY and pitrou as code owners October 13, 2026 15:19
Copilot AI balanced review requested due to automatic review settings October 13, 2026 15:19
@github-actions

Copy link
Copy Markdown

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

Copilot AI 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.

🟢 Approval recommended

The focused change correctly integrates ALP into existing FLOAT and DOUBLE corpus generation.

0 open findings

What changed in this PR

Adds ALP-encoded FLOAT and DOUBLE samples to the Parquet file-level fuzz corpus.

Changes:

  • Adds Encoding::ALP to supported floating-point corpus encodings.
  • Reuses existing datasets and null-probability variants.
File Description
cpp/​src/​parquet/​arrow/​generate_fuzz_corpus.cc Enables ALP for generated floating-point columns.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added the awaiting review Awaiting review label Oct 13, 2026
@wgtmac

wgtmac commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

I didn't change the data samples since I don't have a good answer yet. AI has suggested me these cases for both FLOAT and DOUBLE:

Case Suggested inputs Why
Constants 0.0, 1.25, -1.25 Exercise zero-bit-width packing with zero, positive and negative frame-of-reference values.
Decimal-like data Sequences at several decimal scales, with mixed signs Exercise ALP’s typical workload and exponent/factor selection.
Vector boundaries 1, 1023, 1024, 1025 non-null values Cover short inputs, a full default vector and a partial final vector.
Sparse exceptions Decimal-like values with a few NaNs, infinities and -0.0, including exceptions at vector starts/ends Exercise exception placeholders, positions and patching alongside normally encoded values.
All exceptions Only NaNs, infinities and -0.0 Exercise vectors with no normally encoded values and no packed-value bytes.
Null/page combinations Reuse the existing null patterns in both DataPage V1 and V2 files Exercise non-null value counting and integration with definition levels and page layouts.

However, please correct me if I was wrong, these well-crafted cases will be altered in later fuzz runs at random so I don't think we need all the cases above. Do you have any suggestion? @pitrou

@pitrou

pitrou commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

However, please correct me if I was wrong, these well-crafted cases will be altered in later fuzz runs at random so I don't think we need all the cases above.

Are these cases covered by Parquet data files in parquet-testing?

Random mutation doesn't automatically produce all interesting cases, because of... randomness, so it's better to have a comprehensive seed corpus, but of course it's more tedious to develop and we might want to cut corners away.

@wgtmac

wgtmac commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

Yes, most of them are already covered by alp_extended.zstd.parquet: constants, different decimal scales, sparse and all-exception vectors, NaN payloads, infinities, negative zero, and partial vectors with nulls, for both FLOAT and DOUBLE.

@alamb alamb 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.

Makes sense to me -- thank you @wgtmac

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Oct 14, 2026
@pitrou

pitrou commented Oct 14, 2026

Copy link
Copy Markdown
Member

@github-actions crossbow submit fuzz

@pitrou

pitrou commented Oct 14, 2026

Copy link
Copy Markdown
Member

@wgtmac Do you also attend to tackle the encoding-level Parquet fuzzer?

@github-actions

Copy link
Copy Markdown

Revision: 46f01a3

Submitted crossbow builds: ursacomputing/crossbow @ actions-57a3445bd3

Task Status
test-build-cpp-fuzz GitHub Actions

@wgtmac

wgtmac commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

@wgtmac Do you also attend to tackle the encoding-level Parquet fuzzer?

The encoding-level corpus generator already includes ALP through SupportedEncodings():

case Type::FLOAT:
case Type::DOUBLE:
return ConstVectorRef<Type::FLOAT>(
{Encoding::PLAIN, Encoding::BYTE_STREAM_SPLIT, Encoding::ALP});
.

@pitrou

pitrou commented Oct 14, 2026

Copy link
Copy Markdown
Member

The encoding-level corpus generator already includes ALP through SupportedEncodings():

Oh, well, you're right (and I wrote this code 🙃).

@pitrou
pitrou merged commit 9102924 into apache:main Oct 14, 2026
65 of 70 checks passed
@pitrou pitrou removed the awaiting merge Awaiting merge label Oct 14, 2026
@pitrou

pitrou commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thanks @wgtmac !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++][Parquet] Expand ALP coverage in fuzzing seed corpuses

4 participants