Skip to content

Commit

Permalink
[SPARK-46618][SQL] Improve error messages for DATA_SOURCE_NOT_FOUND e…
Browse files Browse the repository at this point in the history
…rror

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

This PR improves the error messages for the `DATA_SOURCE_NOT_FOUND` error.

### Why are the changes needed?

To make the error messages more user-friendly and update to date.

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

No

### How was this patch tested?

Existing unit tests.

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

No

Closes #44620 from allisonwang-db/spark-46618-not-found-err.

Authored-by: allisonwang-db <allison.wang@databricks.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
  • Loading branch information
allisonwang-db authored and MaxGekk committed Jan 18, 2024
1 parent 92035e3 commit 72e3f06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/utils/src/main/resources/error/error-classes.json
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@
},
"DATA_SOURCE_NOT_FOUND" : {
"message" : [
"Failed to find the data source: <provider>. Please find packages at `https://spark.apache.org/third-party-projects.html`."
"Failed to find the data source: <provider>. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version."
],
"sqlState" : "42K02"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/sql-error-conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ Data source '`<provider>`' not found. Please make sure the data source is regist

[SQLSTATE: 42K02](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation)

Failed to find the data source: `<provider>`. Please find packages at `https://spark.apache.org/third-party-projects.html`.
Failed to find the data source: `<provider>`. Make sure the provider name is correct and the package is properly registered and compatible with your Spark version.

### DATA_SOURCE_TABLE_SCHEMA_MISMATCH

Expand Down

0 comments on commit 72e3f06

Please sign in to comment.