Skip to content

Commit c009cd0

Browse files
uros-dbMaxGekk
authored andcommitted
[SPARK-49392][SQL][FOLLOWUP] Catch errors when failing to write to external data source
### What changes were proposed in this pull request? Change `sqlState` to KD010. ### Why are the changes needed? Necessary modification for the Databricks error class space. ### Does this PR introduce _any_ user-facing change? Yes, the new error message is now updated to KD010. ### How was this patch tested? Existing tests (updated). ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48165 from uros-db/external-data-source-fix. Authored-by: Uros Bojanic <[email protected]> Signed-off-by: Max Gekk <[email protected]>
1 parent 6352c12 commit c009cd0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

common/utils/src/main/resources/error/error-conditions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@
10551055
"message" : [
10561056
"Encountered error when saving to external data source."
10571057
],
1058-
"sqlState" : "KD00F"
1058+
"sqlState" : "KD010"
10591059
},
10601060
"DATA_SOURCE_NOT_EXIST" : {
10611061
"message" : [

common/utils/src/main/resources/error/error-states.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7417,7 +7417,7 @@
74177417
"standard": "N",
74187418
"usedBy": ["Databricks"]
74197419
},
7420-
"KD00F": {
7420+
"KD010": {
74217421
"description": "external data source failure",
74227422
"origin": "Databricks",
74237423
"standard": "N",

sql/core/src/test/scala/org/apache/spark/sql/errors/QueryCompilationErrorsSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ class QueryCompilationErrorsSuite
941941
cmd.run(spark)
942942
},
943943
condition = "DATA_SOURCE_EXTERNAL_ERROR",
944-
sqlState = "KD00F",
944+
sqlState = "KD010",
945945
parameters = Map.empty
946946
)
947947
}

0 commit comments

Comments
 (0)