Skip to content

Commit

Permalink
[MINOR][SQL] Pass cause in CannotReplaceMissingTableException cos…
Browse files Browse the repository at this point in the history
…tructor

### What changes were proposed in this pull request?
In the PR, I propose to use the `cause` argument in the `CannotReplaceMissingTableException` constructor.

### Why are the changes needed?
To improve user experience with Spark SQL while troubleshooting issues. Currently, users don't see where the exception come from.

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

### How was this patch tested?
Manually.

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

Closes apache#43738 from MaxGekk/fix-missed-cause.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
  • Loading branch information
MaxGekk committed Nov 10, 2023
1 parent bd52698 commit 49ca6aa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ class CannotReplaceMissingTableException(
extends AnalysisException(
errorClass = "TABLE_OR_VIEW_NOT_FOUND",
messageParameters = Map("relationName"
-> quoteNameParts(tableIdentifier.namespace :+ tableIdentifier.name)))
-> quoteNameParts(tableIdentifier.namespace :+ tableIdentifier.name)),
cause = cause)

0 comments on commit 49ca6aa

Please sign in to comment.