Skip to content

Conversation

@uros-db
Copy link
Contributor

@uros-db uros-db commented Aug 26, 2024

What changes were proposed in this pull request?

Catch various exceptions thrown by the data source API, when failing to write to a data source, and rethrow externalDataSourceException to provide a more friendly error message for the user.

Why are the changes needed?

To catch non-fatal exceptions when failing to save the results of a query into an external data source (for example: com.crealytics.spark.excel).

Does this PR introduce any user-facing change?

Yes, error messages when failing to write to an external data source should now be more user-friendly.

How was this patch tested?

New test in ExplainSuite.

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

No.

@github-actions github-actions bot added the SQL label Aug 26, 2024
Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

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

The createRelation() method is called from 2 places at the moment. Shall we catch and provide similar errors at writeAndRead() (or in its caller).

@uros-db uros-db requested a review from MaxGekk September 12, 2024 12:19
Copy link
Contributor Author

@uros-db uros-db left a comment

Choose a reason for hiding this comment

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

@MaxGekk thanks, ready for re-review now

@uros-db uros-db requested a review from MaxGekk September 13, 2024 13:36
@MaxGekk
Copy link
Member

MaxGekk commented Sep 13, 2024

+1, LGTM. Merging to master.
Thank you, @uros-db and @allisonwang-db for review.

@MaxGekk MaxGekk changed the title [SPARK-49392] Catch errors when failing to write to external data source [SPARK-49392][SQL] Catch errors when failing to write to external data source Sep 13, 2024
@MaxGekk MaxGekk closed this in bbe6d57 Sep 13, 2024
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