Skip to content

test: name the whole dispatched subtree in the decimal promotion assertion - #5849

Merged
andygrove merged 1 commit into
apache:mainfrom
andygrove:fix/codegen-dispatch-coverage-assertion
Sep 10, 2026
Merged

test: name the whole dispatched subtree in the decimal promotion assertion#5849
andygrove merged 1 commit into
apache:mainfrom
andygrove:fix/codegen-dispatch-coverage-assertion

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #5848.

Rationale for this change

CometCodegenSuite."codegen dispatch coverage survives the decimal promotion rewrite" fails on main and takes the [expressions] job down on all five Spark profiles, so every PR opened against main is red for a reason unrelated to its own changes:

Some(Set("hypot", "cast", "checkoverflow", "add")) did not contain Set("hypot")
(CometCodegenSuite.scala:431)

The behaviour is correct and the assertion is stale. #5610 deliberately started naming every expression in a dispatched subtree rather than only its root: the whole subtree is bound and closure-serialized into one kernel, so all of it ran in the JVM, and naming only the root would let a test assert that a nested abs was native while an abs was in fact running inside the kernel. That PR regenerated the q78 plan-stability goldens for the wider dispatcher list but did not update this assertion, which predates it.

What changes are included in this PR?

Expect the promoted subtree's full set in that assertion: hypot, its cast, the checkoverflow wrapper decimal promotion adds around the add, and the add. The surrounding comment now says why the set has more than the root in it, and why checkoverflow appearing is the thing that makes the assertion evidence that the promoted copy, not the original tree, was recorded.

No production code changes.

How are these changes tested?

CometCodegenSuite passes in full (96 tests) on Spark 4.1. The failing assertion was confirmed red on a clean checkout of main first, and the actual set is identical on all five profiles in CI (3.4, 3.5, 4.0, 4.1, 4.2), so no version-specific expectation is needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BtAqq4YJsk8uk42c7vHk8B

…rtion

apache#5610 started recording every expression in a dispatched subtree rather
than only its root, on the grounds that the whole subtree is bound into
the one kernel and so all of it ran in the JVM. It regenerated the q78
plan-stability goldens for that change but left this assertion expecting
`hypot` alone, so the `[expressions]` job has failed on all five Spark
profiles since.

Expect the promoted subtree's names: `hypot`, its `cast`, the
`checkoverflow` wrapper promotion adds around the decimal `add`, and the
`add` itself.

Closes apache#5848

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BtAqq4YJsk8uk42c7vHk8B
@github-actions github-actions Bot added enhancement New feature or request test Testing related labels Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request test Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CometCodegenSuite decimal promotion coverage assertion is stale and fails the [expressions] job on main

2 participants