You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-44328][SQL] Assign names to the error class _LEGACY_ERROR_TEMP_[2325-2328]
### What changes were proposed in this pull request?
The pr aims to assign names to the error class _LEGACY_ERROR_TEMP_[2325-2328].
### Why are the changes needed?
Improve the error framework.
### Does this PR introduce _any_ user-facing change?
'No'.
### How was this patch tested?
Exists test cases updated and added new test cases.
Closes#41889 from beliefer/SPARK-44328.
Authored-by: Jiaan Geng <[email protected]>
Signed-off-by: Max Gekk <[email protected]>
Copy file name to clipboardExpand all lines: common/utils/src/main/resources/error/error-classes.json
+32-25
Original file line number
Diff line number
Diff line change
@@ -221,6 +221,38 @@
221
221
"Failed to set permissions on created path <path> back to <permission>."
222
222
]
223
223
},
224
+
"CANNOT_UPDATE_FIELD" : {
225
+
"message" : [
226
+
"Cannot update <table> field <fieldName> type:"
227
+
],
228
+
"subClass" : {
229
+
"ARRAY_TYPE" : {
230
+
"message" : [
231
+
"Update the element by updating <fieldName>.element."
232
+
]
233
+
},
234
+
"INTERVAL_TYPE" : {
235
+
"message" : [
236
+
"Update an interval by updating its fields."
237
+
]
238
+
},
239
+
"MAP_TYPE" : {
240
+
"message" : [
241
+
"Update a map by updating <fieldName>.key or <fieldName>.value."
242
+
]
243
+
},
244
+
"STRUCT_TYPE" : {
245
+
"message" : [
246
+
"Update a struct by updating its fields."
247
+
]
248
+
},
249
+
"USER_DEFINED_TYPE" : {
250
+
"message" : [
251
+
"Update a UserDefinedType[<udtSql>] by updating its fields."
252
+
]
253
+
}
254
+
}
255
+
},
224
256
"CANNOT_UP_CAST_DATATYPE" : {
225
257
"message" : [
226
258
"Cannot up cast <expression> from <sourceType> to <targetType>.",
@@ -2965,11 +2997,6 @@
2965
2997
"3. set \"spark.sql.legacy.allowUntypedScalaUDF\" to \"true\" and use this API with caution."
2966
2998
]
2967
2999
},
2968
-
"UPDATE_FIELD_WITH_STRUCT_UNSUPPORTED" : {
2969
-
"message" : [
2970
-
"Cannot update <table> field <fieldName> type: update a struct by updating its fields."
2971
-
]
2972
-
},
2973
3000
"VIEW_ALREADY_EXISTS" : {
2974
3001
"message" : [
2975
3002
"Cannot create view <relationName> because it already exists.",
@@ -5688,26 +5715,6 @@
5688
5715
"Number of dynamic partitions created is <numWrittenParts>, which is more than <maxDynamicPartitions>. To solve this try to set <maxDynamicPartitionsKey> to at least <numWrittenParts>."
5689
5716
]
5690
5717
},
5691
-
"_LEGACY_ERROR_TEMP_2325" : {
5692
-
"message" : [
5693
-
"Cannot update <table> field <fieldName> type: update a map by updating <fieldName>.key or <fieldName>.value."
5694
-
]
5695
-
},
5696
-
"_LEGACY_ERROR_TEMP_2326" : {
5697
-
"message" : [
5698
-
"Cannot update <table> field <fieldName> type: update the element by updating <fieldName>.element."
5699
-
]
5700
-
},
5701
-
"_LEGACY_ERROR_TEMP_2327" : {
5702
-
"message" : [
5703
-
"Cannot update <table> field <fieldName> type: update a UserDefinedType[<udtSql>] by updating its fields."
5704
-
]
5705
-
},
5706
-
"_LEGACY_ERROR_TEMP_2328" : {
5707
-
"message" : [
5708
-
"Cannot update <table> field <fieldName> to interval type."
5709
-
]
5710
-
},
5711
5718
"_LEGACY_ERROR_TEMP_2330" : {
5712
5719
"message" : [
5713
5720
"Cannot change nullable column to non-nullable: <fieldName>."
For more details see [CANNOT_UPDATE_FIELD](sql-error-conditions-cannot-update-field-error-class.html)
264
+
257
265
### CANNOT_UP_CAST_DATATYPE
258
266
259
267
SQLSTATE: none assigned
@@ -1922,12 +1930,6 @@ You're using untyped Scala UDF, which does not have the input type information.
1922
1930
2. use Java UDF APIs, e.g. `udf(new UDF1[String, Integer] { override def call(s: String): Integer = s.length() }, IntegerType)`, if input types are all non primitive.
1923
1931
3. set "spark.sql.legacy.allowUntypedScalaUDF" to "true" and use this API with caution.
1924
1932
1925
-
### UPDATE_FIELD_WITH_STRUCT_UNSUPPORTED
1926
-
1927
-
SQLSTATE: none assigned
1928
-
1929
-
Cannot update `<table>` field `<fieldName>` type: update a struct by updating its fields.
0 commit comments