Skip to content

Conversation

@cloud-fan
Copy link
Contributor

@cloud-fan cloud-fan commented Apr 1, 2024

What changes were proposed in this pull request?

It's quite confusing to report TASK_WRITE_FAILED error when the error was caused by input query execution. This PR updates the error wrapping code to not wrap with TASK_WRITE_FAILED if the error was from input query execution.

Why are the changes needed?

better error reporting

Does this PR introduce any user-facing change?

yes, now people won't see TASK_WRITE_FAILED error if the error was from input query.

How was this patch tested?

updated tests

Was this patch authored or co-authored using generative AI tooling?

no

@github-actions github-actions bot added the SQL label Apr 1, 2024
@cloud-fan cloud-fan changed the title [WIP] Do not wrap query execution error during data writing [SPARK-47689][SQL] Do not wrap query execution error during data writing Apr 2, 2024
@cloud-fan
Copy link
Contributor Author

@cloud-fan
Copy link
Contributor Author

thanks for the review, merging to master!

@cloud-fan cloud-fan closed this in ba98b7a Apr 2, 2024
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @cloud-fan and @HyukjinKwon .

cloud-fan added a commit that referenced this pull request Apr 4, 2024
…ILED error

### What changes were proposed in this pull request?

This is a follow-up of #45797 . Instead of detecting query execution errors and not wrapping them, it's better to do the error wrapping only in the data writer, which has more context. We can provide the specific file path when the error happened, instead of the destination directory name.

### Why are the changes needed?

better error message

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

updated tests

### Was this patch authored or co-authored using generative AI tooling?

No

Closes #45844 from cloud-fan/write-error.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
zhouyuan pushed a commit to apache/incubator-gluten that referenced this pull request Nov 27, 2025
After this PR apache/spark#45797, exception will not be wrapped. This patch fixed the behavior in Spark shim layers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants