Skip to content

variant: Add unshredded Variant path benchmark - #10357

Merged
Jefffrey merged 1 commit into
apache:mainfrom
pydantic:friendlymatthew/variant-get-object-path-benchmark
Jul 29, 2026
Merged

Jefffrey merged 1 commit into
apache:mainfrom
pydantic:friendlymatthew/variant-get-object-path-benchmark

Conversation

@friendlymatthew

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR adds a benchmark for extracting an object field from an unshredded Variant column with variant_get. This benchmark extracts one field across 262,144 rows using a 300-entry metadata dictionary

@github-actions github-actions Bot added the parquet-variant parquet-variant* crates label Jul 16, 2026
@Jefffrey Jefffrey added the development-process Internal changes; PRs with this label are excluded from changelog label Jul 29, 2026
@Jefffrey
Jefffrey merged commit a1ec3b1 into apache:main Jul 29, 2026
17 checks passed
@Jefffrey

Copy link
Copy Markdown
Contributor

thanks @friendlymatthew

alamb pushed a commit that referenced this pull request Sep 28, 2026
# Which issue does this PR close?

Follow-up to #10357; corrects the benchmark used by #10358.

# Rationale for this change

The unshredded object fixture has a literal field named `attr.140`, but
`VariantPath::try_from("attr.140")` parses it as two nested fields
(`attr` then `140`). Since the fixture has no `attr` field, the
benchmark returns NULL for every row instead of extracting the intended
value.

# What changes are included in this PR?

Construct the path with `VariantPathElement::field("attr.140")` and
assert that every result is `Some(140)` before entering the timed loop.

# Are these changes tested?

- `cargo bench --offline -p parquet-variant-compute --bench
variant_kernels -- variant_get_unshredded_object_path_262k_rows --test`
- `cargo fmt --all -- --check`
- `git diff --check`

# Are there any user-facing changes?

No. This only corrects the benchmark workload; previous timings for this
benchmark measured missing-path handling.
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