Repository navigation
perf: key the codegen dispatcher's kernel cache on a digest of the expression #6709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mbutrovich
merged 8 commits into
apache:main
from
andygrove:andygrove/issue-6705-dispatcher-cache-key
Oct 7, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6a25104
perf: key the codegen dispatcher's kernel cache on a digest of the ex…
andygrove c7f8ce9
perf: build a JVM UDF's literal arguments once instead of for every b…
andygrove 4cf4f40
test: add a benchmark of a Scala UDF's per-batch cost on the codegen …
andygrove 544c147
docs: say that a CometUDF must not modify its inputs
andygrove 6139833
test: check that new children rebuild a JVM UDF's literal arrays
andygrove 1a5797f
docs: say that a CometUDF's literal argument shares buffers, not a ve…
andygrove 9cd734d
test: check that the serde ships a digest of the serialized expression
andygrove cfc8847
Merge remote-tracking branch 'apache/main' into andygrove/issue-6705-…
andygrove File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should a test check what the serde emits here, that arg 0 is the digest of arg 1? The dispatcher trusts a cache hit without comparing the bytes, so this line is what keeps two different expressions from sharing a kernel. The new test in
CometCodegenSuitebuilds its own digest withCometScalaUDFCodegen.digestand calls the dispatcher directly. It would keep passing if the digest the serde ships stopped matching the bytes it ships next to it.The test
codegen dispatch coverage survives the decimal promotion rewritealready builds the proto throughQueryPlanSerde.exprToProto(L601-L617), so it could check this with a few lines, something like:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added