-
Couldn't load subscription status.
- Fork 28.9k
[SPARK-41708][SQL][FOLLOWUP] Do not insert columnar to row transition before write command #39922
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
Conversation
| assert(result(2).getLong(0) == 301L) | ||
|
|
||
| withTempPath { path => | ||
| val e = intercept[Exception](df.write.parquet(path.getCanonicalPath)) |
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.
without the fix, it fails with class org.apache.spark.sql.execution.WholeStageCodegenExec has write support mismatch
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.
Can we catch more specific exception though?
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.
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.
Got it. Since it's a test suite and this test case matches the exception message exactly, looks fine.
|
lgtm |
|
thanks for the review, merging to master/3.4! |
… before write command ### What changes were proposed in this pull request? This is a followup of #39277 . With planned write, the write command requires neither columnar nor row-based execution. It invokes a new API `executeWrite`, which returns commit messages, not columnar or row-based data. This PR updates `ApplyColumnarRulesAndInsertTransitions` to take this case into consideration. ### Why are the changes needed? If people replaces `WriteFilesExec` with a columnar version, the plan can't be executed due to an extra columnar to row transition between `WriteFilesExee` and the write command. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? new test Closes #39922 from cloud-fan/write. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 56dd20f) Signed-off-by: Wenchen Fan <[email protected]>
… before write command ### What changes were proposed in this pull request? This is a followup of apache#39277 . With planned write, the write command requires neither columnar nor row-based execution. It invokes a new API `executeWrite`, which returns commit messages, not columnar or row-based data. This PR updates `ApplyColumnarRulesAndInsertTransitions` to take this case into consideration. ### Why are the changes needed? If people replaces `WriteFilesExec` with a columnar version, the plan can't be executed due to an extra columnar to row transition between `WriteFilesExee` and the write command. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? new test Closes apache#39922 from cloud-fan/write. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 56dd20f) Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
This is a followup of #39277 . With planned write, the write command requires neither columnar nor row-based execution. It invokes a new API
executeWrite, which returns commit messages, not columnar or row-based data.This PR updates
ApplyColumnarRulesAndInsertTransitionsto take this case into consideration.Why are the changes needed?
If people replaces
WriteFilesExecwith a columnar version, the plan can't be executed due to an extra columnar to row transition betweenWriteFilesExeeand the write command.Does this PR introduce any user-facing change?
No
How was this patch tested?
new test