Skip to content

[SPARK-46956][SQL] Improve the error prompt when SaveMode is null in API DataFrameWriter.mode#44999

Closed
panbingkun wants to merge 3 commits intoapache:masterfrom
panbingkun:improve_savemode_null
Closed

[SPARK-46956][SQL] Improve the error prompt when SaveMode is null in API DataFrameWriter.mode#44999
panbingkun wants to merge 3 commits intoapache:masterfrom
panbingkun:improve_savemode_null

Conversation

@panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Feb 2, 2024

What changes were proposed in this pull request?

The pr aims to improve the error prompt when SaveMode is null in API DataFrameWriter.mode.

Why are the changes needed?

When mode is null in API DataFrameWriter.mode, the prompt information is more reasonable and will not cause misunderstandings.

  • Before:
    image

  • After:
    image

Does this PR introduce any user-facing change?

Yes, make more reasonable error prompts to reduce misunderstandings.

How was this patch tested?

  • Update existed UT.
  • Pass GA.

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

No.

@panbingkun panbingkun marked this pull request as ready for review February 3, 2024 00:41
"""{
| "errorClass" : "UNSUPPORTED_SAVE_MODE.EXISTENT_PATH",
| "messageTemplate" : "The save mode <saveMode> is not supported for: an existent path.",
| "messageTemplate" : "The save mode <saveMode> is not supported. for an existent path.",
Copy link
Member

Choose a reason for hiding this comment

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

This supported. for an looks weird. Could you improve the error message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, let me think about it carefully.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@panbingkun panbingkun requested a review from MaxGekk February 4, 2024 07:11
@github-actions
Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label May 15, 2024
@github-actions github-actions bot closed this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants