bench: scalar functions over dictionary-encoded columns - #24586
Open
radmirnovii wants to merge 1 commit into
Open
bench: scalar functions over dictionary-encoded columns#24586radmirnovii wants to merge 1 commit into
radmirnovii wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Refs #20935 and #19458.
Rationale for this change
Scalar functions over dictionary-encoded columns have no benchmark coverage:
neither the hand-written dictionary arms (e.g.
reverse's, from #23930) northe cast away from the encoding that every function without preservation pays
(e.g.
encode). This lands the baseline first, so follow-up work generalizingthe arms shows its delta on stable benchmark ids.
What changes are included in this PR?
One criterion benchmark:
reverseover a dictionary of its own per batch (cold) and one sharedacross batches the way a Parquet column chunk delivers them (
warm) — todaythe two cost the same, since an arm cannot reuse anything across batches;
cast_away: the dictionary cast to its value type and the function calledonce per row — what any function without encoding preservation pays;
flat: the same rows with no encoding anywhere, as a bound.encodecannot be called over a dictionary today, so it has nodictionary-typed groups yet.
Are these changes tested?
cargo bench -p datafusion-physical-expr --bench scalar_function_dictionaryruns clean.
Are there any user-facing changes?
No.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NysGeXTG5opiJKBApsAe5H