Skip to content

Commit 1e30564

Browse files
itholicMaxGekk
authored andcommitted
[SPARK-40663][SQL] Migrate execution errors onto error classes: _LEGACY_ERROR_TEMP_2000-2025
### What changes were proposed in this pull request? This PR proposes to migrate 26 execution errors onto temporary error classes with the prefix `_LEGACY_ERROR_TEMP_2000` to `_LEGACY_ERROR_TEMP_2024`. The error classes are prefixed with `_LEGACY_ERROR_TEMP_` indicates the dev-facing error messages, and won't be exposed to end users. ### Why are the changes needed? To speed-up the error class migration. The migration on temporary error classes allow us to analyze the errors, so we can detect the most popular error classes. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? ``` $ build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite" $ build/sbt "test:testOnly *SQLQuerySuite" $ build/sbt -Phadoop-3 -Phive-thriftserver catalyst/test hive-thriftserver/test ``` Closes #38104 from itholic/SPARK-40540-2000. Authored-by: itholic <haejoon.lee@databricks.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
1 parent 5600bef commit 1e30564

File tree

8 files changed

+438
-119
lines changed

8 files changed

+438
-119
lines changed

core/src/main/resources/error/error-classes.json

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,5 +3002,135 @@
30023002
"message" : [
30033003
"Failed to execute command because subquery expressions are not allowed in DEFAULT values."
30043004
]
3005+
},
3006+
"_LEGACY_ERROR_TEMP_2000" : {
3007+
"message" : [
3008+
"<message>. If necessary set <ansiConfig> to false to bypass this error."
3009+
]
3010+
},
3011+
"_LEGACY_ERROR_TEMP_2001" : {
3012+
"message" : [
3013+
"<message> If necessary set <ansiConfig> to false to bypass this error"
3014+
]
3015+
},
3016+
"_LEGACY_ERROR_TEMP_2002" : {
3017+
"message" : [
3018+
"<message>"
3019+
]
3020+
},
3021+
"_LEGACY_ERROR_TEMP_2003" : {
3022+
"message" : [
3023+
"Unsuccessful try to zip maps with <size> unique keys due to exceeding the array size limit <maxRoundedArrayLength>"
3024+
]
3025+
},
3026+
"_LEGACY_ERROR_TEMP_2004" : {
3027+
"message" : [
3028+
"no default for type <dataType>"
3029+
]
3030+
},
3031+
"_LEGACY_ERROR_TEMP_2005" : {
3032+
"message" : [
3033+
"Type <dataType> does not support ordered operations"
3034+
]
3035+
},
3036+
"_LEGACY_ERROR_TEMP_2006" : {
3037+
"message" : [
3038+
"The specified group index cannot be less than zero"
3039+
]
3040+
},
3041+
"_LEGACY_ERROR_TEMP_2007" : {
3042+
"message" : [
3043+
"Regex group count is <groupCount>, but the specified group index is <groupIndex>"
3044+
]
3045+
},
3046+
"_LEGACY_ERROR_TEMP_2008" : {
3047+
"message" : [
3048+
"Find an invalid url string <url>. If necessary set <ansiConfig> to false to bypass this error."
3049+
]
3050+
},
3051+
"_LEGACY_ERROR_TEMP_2009" : {
3052+
"message" : [
3053+
"dataType"
3054+
]
3055+
},
3056+
"_LEGACY_ERROR_TEMP_2010" : {
3057+
"message" : [
3058+
"Window Functions do not support merging."
3059+
]
3060+
},
3061+
"_LEGACY_ERROR_TEMP_2011" : {
3062+
"message" : [
3063+
"Unexpected data type <dataType>"
3064+
]
3065+
},
3066+
"_LEGACY_ERROR_TEMP_2012" : {
3067+
"message" : [
3068+
"Unexpected type <dataType>"
3069+
]
3070+
},
3071+
"_LEGACY_ERROR_TEMP_2013" : {
3072+
"message" : [
3073+
"Negative values found in <frequencyExpression>"
3074+
]
3075+
},
3076+
"_LEGACY_ERROR_TEMP_2014" : {
3077+
"message" : [
3078+
"<funcName> is not matched at addNewFunction"
3079+
]
3080+
},
3081+
"_LEGACY_ERROR_TEMP_2015" : {
3082+
"message" : [
3083+
"Cannot generate <codeType> code for incomparable type: <dataType>"
3084+
]
3085+
},
3086+
"_LEGACY_ERROR_TEMP_2016" : {
3087+
"message" : [
3088+
"Can not interpolate <arg> into code block."
3089+
]
3090+
},
3091+
"_LEGACY_ERROR_TEMP_2017" : {
3092+
"message" : [
3093+
"not resolved"
3094+
]
3095+
},
3096+
"_LEGACY_ERROR_TEMP_2018" : {
3097+
"message" : [
3098+
"class `<cls>` is not supported by `MapObjects` as resulting collection."
3099+
]
3100+
},
3101+
"_LEGACY_ERROR_TEMP_2019" : {
3102+
"message" : [
3103+
"Cannot use null as map key!"
3104+
]
3105+
},
3106+
"_LEGACY_ERROR_TEMP_2020" : {
3107+
"message" : [
3108+
"Couldn't find a valid constructor on <cls>"
3109+
]
3110+
},
3111+
"_LEGACY_ERROR_TEMP_2021" : {
3112+
"message" : [
3113+
"Couldn't find a primary constructor on <cls>"
3114+
]
3115+
},
3116+
"_LEGACY_ERROR_TEMP_2022" : {
3117+
"message" : [
3118+
"Unsupported natural join type <joinType>"
3119+
]
3120+
},
3121+
"_LEGACY_ERROR_TEMP_2023" : {
3122+
"message" : [
3123+
"Unresolved encoder expected, but <attr> was found."
3124+
]
3125+
},
3126+
"_LEGACY_ERROR_TEMP_2024" : {
3127+
"message" : [
3128+
"Only expression encoders are supported for now."
3129+
]
3130+
},
3131+
"_LEGACY_ERROR_TEMP_2025" : {
3132+
"message" : [
3133+
"<className> must override either <m1> or <m2>"
3134+
]
30053135
}
30063136
}

0 commit comments

Comments
 (0)