Skip to content

[Variant] Add variant_to_json benchmarks - #11773

Merged
jayzhan211 merged 2 commits into
apache:mainfrom
sdf-jkl:codex/variant-to-json-benchmarks-pr
Oct 25, 2026
Merged

jayzhan211 merged 2 commits into
apache:mainfrom
sdf-jkl:codex/variant-to-json-benchmarks-pr

Conversation

@sdf-jkl

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

Copy link
Copy Markdown
Member

Which issue does this PR close?

Rationale for this change

variant_kernels.rs benchmarks json_to_variant and variant_get, but has no coverage for variant_to_json. Add benchmarks to track serialization performance and evaluate changes such as avoiding temporary string allocations in #11402.

What changes are included in this PR?

Add seven variant_to_json benchmarks, each processing 8,192 rows:

  • Integer scalars and the same values in shredded form.
  • Small objects containing two strings and an integer.
  • The same small objects with dictionary and run-end-encoded metadata.
  • Wide objects using the existing seeded generator with 200 entries per object and mixed scalar values.
  • Numeric lists with 0–100 elements.

Reuse existing fixture generators and the shared row-count constant. Fixture construction and metadata encoding happen outside the timed loops.

Are these changes tested?

All seven cases passed a smoke run and completed a release-mode Criterion run with 100 samples each. Compilation, formatting, and spelling checks pass. Clippy with the installed stable toolchain encounters existing lint errors in arrow-data.

Are there any significant user-facing changes?

No.

AI assistance: OpenAI Codex helped implement and refine the benchmarks, run local validation, and draft this description.

@github-actions github-actions Bot added the parquet-variant parquet-variant* crates label Oct 21, 2026
@sdf-jkl

sdf-jkl commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

FYI @peterxcli @jayzhan211 @Jefffrey

@jayzhan211

Copy link
Copy Markdown
Contributor

CI failed, I will take a look after the CI fix

@sdf-jkl

sdf-jkl commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

CI failed, I will take a look after the CI fix

That was due to an unrelated issue of ubuntu-latest migrating from 24.04 to 26.04 -- #11799

@Rich-T-kid

Copy link
Copy Markdown
Contributor

is this fine to merge or are we waiting for @jayzhan211 to take a look. no rush either way just checking

@jayzhan211
jayzhan211 added this pull request to the merge queue Oct 25, 2026
@jayzhan211

Copy link
Copy Markdown
Contributor

Thanks @sdf-jkl @Rich-T-kid !

Merged via the queue into apache:main with commit e090862 Oct 25, 2026
26 checks passed
@Rich-T-kid Rich-T-kid added the development-process Internal changes; PRs with this label are excluded from changelog label Nov 16, 2026
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.

3 participants