docs: reflect codegen dispatch fallback in expression compatibility guide#4649
Merged
andygrove merged 1 commit intoJun 14, 2026
Merged
Conversation
comphead
approved these changes
Jun 13, 2026
comphead
left a comment
Contributor
There was a problem hiding this comment.
Thanks @andygrove
1 nit: looks like we have some duplications for expression compat guide, WDYT about combining them to bigger sections like Spark 3, Spark 4?
Member
Author
The challenge is that there are differences between Spark 4.0 and 4.1. |
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?
Closes #.
Rationale for this change
The expression compatibility guide is auto-generated by
GenerateDocs.scala. For everyIncompatibleexpression it printed a sentence like:This is no longer accurate for expressions that opt into the
CodegenDispatchFallbacktrait. Those expressions do not fall back to Spark by default. They stay in Comet's native pipeline via the JVM codegen dispatcher (running Spark's own generated code) and match Spark exactly. For these expressions,allowIncompatible=trueswitches to the faster native implementation that carries the listed differences, rather than enabling Comet acceleration that was otherwise disabled.What changes are included in this PR?
GenerateDocs.scalanow emits different prose for expressions enrolled in codegen-dispatch fallback. Those expressions document that Comet accelerates them by default via JVM codegen dispatch (Spark-compatible), and thatallowIncompatible=trueopts into the faster native path with the listed differences. Non-dispatch expressions (such asCast,SortArray,CollectSet) keep the original "fall back to Spark by default" wording, which remains accurate for them.CategoryNotestuple into anExprNotescase class. Aggregate serdes use a separate builder sinceCometAggregateExpressionSerdeis not a subtype ofCometExpressionSerdeand never participates in codegen dispatch.expressions/index.mdand the four per-versionspark-{3.4,3.5,4.0,4.1}/index.mdpages), which carried the same inaccuracy.How are these changes tested?
This is a documentation generation change. I ran
GenerateDocsagainst a temporary copy of the templates for the Spark 3.5 profile and confirmed both prose variants render correctly: codegen-dispatch expressions (for exampleSecond) get the new wording, and non-dispatch expressions (for exampleSortArray,CollectSet) retain the original wording. The Spark module compiles and the changed files pass spotless and prettier.