Commit ad958d4
### What changes were proposed in this pull request?
This PR assigns named error conditions and SQLSTATEs for three Hive UDF/UDAF/UDTF Java type legacy error classes:
- `_LEGACY_ERROR_TEMP_3090` -> `UNSUPPORTED_HIVE_FUNCTION_TYPE.RAW_LIST`
- `_LEGACY_ERROR_TEMP_3091` -> `UNSUPPORTED_HIVE_FUNCTION_TYPE.RAW_MAP`
- `_LEGACY_ERROR_TEMP_3092` -> `UNSUPPORTED_HIVE_FUNCTION_TYPE.WILDCARD`
The three conditions share the `UNSUPPORTED_HIVE_FUNCTION_TYPE` parent with SQLSTATE `0A000` because all three cases reject unsupported Hive function Java type signatures while Spark infers Catalyst types.
### Why are the changes needed?
To replace temporary legacy error classes with stable named error conditions and SQLSTATEs.
### Does this PR introduce _any_ user-facing change?
Yes. The affected errors now report named error conditions and SQLSTATEs, and their messages are grouped under the new `UNSUPPORTED_HIVE_FUNCTION_TYPE` condition.
### How was this patch tested?
Ran targeted tests:
```
./build/sbt "core/testOnly org.apache.spark.SparkThrowableSuite"
./build/sbt "hive/testOnly org.apache.spark.sql.hive.execution.HiveUDFSuite -- -z \"UDFRaw\""
./build/sbt "hive/testOnly org.apache.spark.sql.hive.execution.HiveUDFSuite -- -z \"UDFWildcardList\""
```
Also ran:
```
jq empty common/utils/src/main/resources/error/error-conditions.json
git diff --check
```
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex
Closes #56905 from michaelmitchell-bit/SPARK-57752-57753-57754-hive-udf-error-classes.
Authored-by: michaelmitchell-bit <hiremichaeltech@gmail.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
1 parent 156d0aa commit ad958d4
3 files changed
Lines changed: 32 additions & 21 deletions
File tree
- common/utils/src/main/resources/error
- sql/hive/src
- main/scala/org/apache/spark/sql/hive
- test/scala/org/apache/spark/sql/hive/execution
Lines changed: 23 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8626 | 8626 | | |
8627 | 8627 | | |
8628 | 8628 | | |
| 8629 | + | |
| 8630 | + | |
| 8631 | + | |
| 8632 | + | |
| 8633 | + | |
| 8634 | + | |
| 8635 | + | |
| 8636 | + | |
| 8637 | + | |
| 8638 | + | |
| 8639 | + | |
| 8640 | + | |
| 8641 | + | |
| 8642 | + | |
| 8643 | + | |
| 8644 | + | |
| 8645 | + | |
| 8646 | + | |
| 8647 | + | |
| 8648 | + | |
| 8649 | + | |
| 8650 | + | |
| 8651 | + | |
8629 | 8652 | | |
8630 | 8653 | | |
8631 | 8654 | | |
| |||
11368 | 11391 | | |
11369 | 11392 | | |
11370 | 11393 | | |
11371 | | - | |
11372 | | - | |
11373 | | - | |
11374 | | - | |
11375 | | - | |
11376 | | - | |
11377 | | - | |
11378 | | - | |
11379 | | - | |
11380 | | - | |
11381 | | - | |
11382 | | - | |
11383 | | - | |
11384 | | - | |
11385 | | - | |
11386 | 11394 | | |
11387 | 11395 | | |
11388 | 11396 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
249 | | - | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
253 | | - | |
| 255 | + | |
| 256 | + | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
0 commit comments