Repository navigation
fix: preserve columnar output when reverting a cached AQE result stage #6852
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
andygrove
merged 5 commits into
apache:main
from
andygrove:andygrove/github-issue-6687-fix
Oct 28, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e872a5d
fix: preserve columnar output when reverting a cached AQE result stage
andygrove 7552039
fix: skip reverting a result stage whose root supports both formats u…
andygrove bc5bddc
fix: apply the dual-format result-stage check only under AQE
andygrove 5158616
Merge remote-tracking branch 'apache/main' into andygrove/github-issu…
andygrove 5fc0358
test: cover the result root's output format at the rule level on ever…
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
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.
The new
outputColumnar = !plan.supportsRowBasedbranch for a columnar-only root is only exercised by this test, which is skipped before Spark 4.0, and the suite has no assertion onRowToColumnarExec(the only mentions are in a doc comment). The branch itself is version independent, so the 3.4 and 3.5 profiles never run it. Could a small rule-level case cover it, like theBothFormatsExectest already does for the dual-format root? For example, apply the rule toCometSparkToColumnarExec(CometNativeColumnarToRowExec(cometFilter(leaf))), which is columnar-only with one transition, and assert aRowToColumnarExecover a reverted root with no Comet execs left, plus the matching row case where aColumnarToRowExecroot stays row output. I did not run the suite.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.
You are right, the branch does not depend on the Spark version, so the 3.4 and 3.5 profiles should run it. 5fc0358 adds a rule-level test, "keeps the output format of the result root", that applies the rule to
CometSparkToColumnarExec(CometNativeColumnarToRowExec(cometFilter(leaf)))over a row-only leaf and asserts aRowToColumnarExecover the SparkFilterExecwith no Comet execs left. It then wraps that root in aColumnarToRowExecand asserts the reverted stage still outputs rows, with noRowToColumnarExec. Both run with AQE on and off. I ran the suite on Spark 4.1 and 3.5, and with the branch changed tooutputColumnar = falseboth new tests fail on 3.5.