docs: add scalar expression optimization guide, skill, and performance audits - #4933
Merged
Merged
Conversation
andygrove
marked this pull request as ready for review
July 15, 2026 13:51
…e audits Add a contributor guide page documenting how to optimize native scalar expressions in datafusion-comet-spark-expr: benchmark-first workflow, criterion benchmark shapes, a catalog of proven techniques, correctness rules, and the no-regression gate. Add a matching optimize-comet-expression skill that points at the guide as the shared source of truth. Extend the per-expression audit pages to record performance audits alongside correctness audits, and backfill entries for the recently tuned cast, to_json, parse_url, size, and unhex expressions.
andygrove
force-pushed
the
docs-optimize-expression-skill
branch
from
July 15, 2026 13:51
1898168 to
1d0a083
Compare
…d noise-vs-regression lessons
comphead
approved these changes
Jul 15, 2026
comphead
left a comment
Contributor
There was a problem hiding this comment.
Thanks @andygrove lets give it a try
Contributor
|
Please run formatter |
15 tasks
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?
N/A
Rationale for this change
Comet has accumulated a campaign of scalar expression performance optimizations (for example
spark_cast_int_to_int,to_json,parse_url,spark_size,spark_unhex, and many more in flight). The recurring methodology and pitfalls have lived only in individual PR descriptions. This PR captures that knowledge in one place so both human contributors and automated agents follow the same approach, and so we can track which expressions have already been tuned.What changes are included in this PR?
Optimizing Scalar Expressions(added to the Debugging and Performance section) covering the benchmark-first workflow, criterion benchmark shapes that expose regressions, a catalog of proven techniques mapped to the PRs that landed them, correctness rules (bit-identical output, null-slot error handling, eval-mode semantics), and the no-regression gate.optimize-comet-expressionskill that points at the guide as the shared source of truth and adds the agent execution loop and submission gate.Performance (tuned ...)line naming the technique, speedup, PR, and benchmark file.cast(int-to-int),to_json,parse_url,size, andunhexoptimizations.How are these changes tested?
Documentation and skill content only; no code changes. Verified the new page is wired into the contributor guide toctree and that the audit entries land under the correct expression headings.