Skip to content

Add Variant string-to-decimal benchmarks - #11556

Merged
sdf-jkl merged 1 commit into
apache:mainfrom
sdf-jkl:codex/variant-string-to-decimal-benchmarks
Oct 17, 2026
Merged

sdf-jkl merged 1 commit into
apache:mainfrom
sdf-jkl:codex/variant-string-to-decimal-benchmarks

Conversation

@sdf-jkl

@sdf-jkl sdf-jkl commented Oct 14, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Follow-up to #11416.

Rationale for this change

The existing variant_get decimal benchmarks cover integer and floating-point
inputs, but not strings. These cases provide a baseline for measuring changes
to string parsing and decimal conversion.

What changes are included in this PR?

Add six benchmarks covering four conversion paths:

  • Short strings to Decimal32 in safe and strict modes.
  • Strings longer than Variant's 63-byte short-string limit to Decimal128 in
    safe and strict modes.
  • Wide values to Decimal256, exercising accumulation beyond the Decimal128
    range.
  • Strings to Decimal256 with a negative scale, exercising the additional
    integer-digit scan and scale-down path.

Fixtures contain 8,192 unshredded Variant rows with approximately 10% nulls and
a fixed RNG seed. They reuse the existing bench_variant_get_decimal helper,
with fixture construction outside timing.

Are these changes tested?

This PR adds benchmarks only. All six cases were smoke-tested on upstream main
(4dc6bc25f3). Formatting and whitespace checks pass. No library behavior
changes or additional unit tests are included.

Are there any significant user-facing changes?

No.

AI usage

Developed with assistance from OpenAI Codex for implementation, validation,
and this description.

@github-actions github-actions Bot added the parquet-variant parquet-variant* crates label Oct 14, 2026
@Jefffrey Jefffrey added the development-process Internal changes; PRs with this label are excluded from changelog label Oct 17, 2026
@sdf-jkl

sdf-jkl commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

Thanks @Jefffrey 🙌

@sdf-jkl
sdf-jkl added this pull request to the merge queue Oct 17, 2026
Merged via the queue into apache:main with commit 94789d5 Oct 17, 2026
25 checks passed
@sdf-jkl
sdf-jkl deleted the codex/variant-string-to-decimal-benchmarks branch October 17, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Internal changes; PRs with this label are excluded from changelog parquet-variant parquet-variant* crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants