-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-43327][CORE][3.3] Trigger committer.setupJob before plan execute in FileFormatWriter#write
#41154
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
| } | ||
| } | ||
|
|
||
| test("SPARK-43327: location exists when insertoverwrite fails") { |
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.
This issue did not occur in the latest master branch, only in Spark3.2 and Spark3.3
committer.setupJob before plan execute in FileFormatWriter#writecommitter.setupJob before plan execute in FileFormatWriter#write
committer.setupJob before plan execute in FileFormatWriter#writecommitter.setupJob before plan execute in FileFormatWriter#write
|
@zzzzming95 do you know in which PR fixed the issue in master branch? |
The direct reason is because SPARK-37287, spark/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/InsertAdaptiveSparkPlan.scala Line 52 in 7107742
It causes' DataWriteingCommandExec 'to be encapsulated in' AdaptiveSparkPlanExec 'and triggers execution in advance. mabay we can just backport |
|
SPARK-37287 is too big to backport |
| sql("create table t1(c2 long) using parquet") | ||
| sql("INSERT OVERWRITE TABLE t1 select 6000044164") | ||
|
|
||
| // spark.sql("CREATE TABLE IF NOT EXISTS t(amt1 int) using ORC") |
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.
shall we remove it?
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.
done
|
do you know how to make it run green ? I see all test pass. Or it can merge directly? please take a look , thanks~ |
|
yea all tests passed, let me just merge it. Thanks! |
…cute in `FileFormatWriter#write` ### What changes were proposed in this pull request? Trigger `committer.setupJob` before plan execute in `FileFormatWriter#write` ### Why are the changes needed? In this issue, the case where `outputOrdering` might not work if AQE is enabled has been resolved. #38358 However, since it materializes the AQE plan in advance (triggers getFinalPhysicalPlan) , it may cause the committer.setupJob(job) to not execute When `AdaptiveSparkPlanExec#getFinalPhysicalPlan()` is executed with an error. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? add UT Closes #41154 from zzzzming95/spark3-SPARK-43327. Lead-authored-by: zzzzming95 <[email protected]> Co-authored-by: zhiming she <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
|
@cloud-fan |
What changes were proposed in this pull request?
Trigger
committer.setupJobbefore plan execute inFileFormatWriter#writeWhy are the changes needed?
In this issue, the case where
outputOrderingmight not work if AQE is enabled has been resolved.#38358
However, since it materializes the AQE plan in advance (triggers getFinalPhysicalPlan) , it may cause the committer.setupJob(job) to not execute When
AdaptiveSparkPlanExec#getFinalPhysicalPlan()is executed with an error.Does this PR introduce any user-facing change?
no
How was this patch tested?
add UT