chore(audit): audit conditional expressions across Spark 3.4.3, 3.5.8, 4.0.1, 4.1.1#4475
Open
andygrove wants to merge 1 commit into
Open
chore(audit): audit conditional expressions across Spark 3.4.3, 3.5.8, 4.0.1, 4.1.1#4475andygrove wants to merge 1 commit into
andygrove wants to merge 1 commit into
Conversation
…, 4.0.1, 4.1.1 Add per-version audit sub-bullets to `coalesce`, `if`, `ifnull`, `nullif`, `nvl`, `nvl2`, and `when` in `docs/source/contributor-guide/spark_expressions_support.md`. Only three Comet serdes back this entire category: - `CometIf` handles `if`, `nvl2` (rewritten to `If(IsNotNull, e2, e3)`), and `nullif` (rewritten to `If(EqualTo, null, left)`). - `CometCoalesce` handles `coalesce`, `nvl` (rewritten to `Coalesce`), and `ifnull` (registry alias of `nvl`). - `CometCaseWhen` handles `when` / SQL `CASE WHEN`. The Spark classes are byte-for-byte identical across all four versions for behaviour; Spark 4.0 only added the `withNewAlwaysEvaluatedInputs` optimizer hook on `If`/`CaseWhen` and reformatted error messages (no runtime change). No support-level consistency issues were found in the three serdes; all convert-time fallbacks are for child-conversion failures (which cannot be detected from the expression alone). No new tracking issues are filed.
This was referenced May 27, 2026
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
Continuation of the per-category expression audit. Same pattern as #4474 (misc), #4473 (collection), #4470 (json), #4469 (struct), using the updated
audit-comet-expressionskill in #4468.What changes are included in this PR?
Support-doc audit notes
Add per-version audit sub-bullets to
coalesce,if,ifnull,nullif,nvl,nvl2, andwhenindocs/source/contributor-guide/spark_expressions_support.md. Only three Comet serdes back this entire category:CometIfhandlesif,nvl2(rewritten by the analyzer toIf(IsNotNull, e2, e3)), andnullif(rewritten toIf(EqualTo, null, left)).CometCoalescehandlescoalesce,nvl(rewritten toCoalesce), andifnull(registry alias ofnvl).CometCaseWhenhandleswhen/ SQLCASE WHEN.The Spark classes are byte-for-byte identical across all four versions for behaviour; Spark 4.0 only added the
withNewAlwaysEvaluatedInputsoptimizer hook onIf/CaseWhenand reformatted error messages (no runtime change).Support-level consistency fixes
None. All three serdes were already clean: no
Incompatible(None)cases, no reason-string drift, and the convert-timewithInfofallbacks are for child-conversion failures which (per the skill) legitimately belong inconvertrather thangetSupportLevel.Tracking issues filed for follow-up
None. No correctness divergences were found.
Audit process
Audited directly using the
audit-comet-expressionskill (4 Spark versions per #4468). Three small serdes, no parallel subagents needed.How are these changes tested?
make coresucceeds (no code changes; only the doc was updated).CometExpressionSuiteandCometSqlFileTestSuitecoverage forif,case when,coalesce, and theirRuntimeReplaceablecallers remains unchanged.