Commit 34ac927
[SPARK-55865][SQL] Rename _LEGACY_ERROR_TEMP_1266 to CANNOT_TRUNCATE_EXTERNAL_TABLE
### What changes were proposed in this pull request?
Rename the legacy error condition `_LEGACY_ERROR_TEMP_1266` to a proper error class `CANNOT_TRUNCATE_EXTERNAL_TABLE` with SQL state `0A000` (feature not supported). Also renames the message parameter from `tableIdentWithDB` to `tableName` for consistency.
### Why are the changes needed?
`_LEGACY_ERROR_TEMP_1266` is a legacy placeholder error name. It should be replaced with a descriptive error class name and assigned a proper SQL state to improve error reporting and comply with the ANSI SQL standard.
### Does this PR introduce _any_ user-facing change?
Yes. The error condition name changes from `_LEGACY_ERROR_TEMP_1266` to `CANNOT_TRUNCATE_EXTERNAL_TABLE` and now includes SQL state `0A000`. The error message itself remains unchanged.
### How was this patch tested?
Existing tests (including `TruncateTableSuite`).
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code 2.1.70
Closes #54661 from mikhailnik-db/cannot-truncate-external-table.
Authored-by: Mikhail Nikoliukin <mikhail.nikoliukin@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>1 parent 66af041 commit 34ac927
3 files changed
Lines changed: 10 additions & 9 deletions
File tree
- common/utils/src/main/resources/error
- sql
- catalyst/src/main/scala/org/apache/spark/sql/errors
- core/src/test/scala/org/apache/spark/sql/execution/command/v1
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
550 | 556 | | |
551 | 557 | | |
552 | 558 | | |
| |||
9154 | 9160 | | |
9155 | 9161 | | |
9156 | 9162 | | |
9157 | | - | |
9158 | | - | |
9159 | | - | |
9160 | | - | |
9161 | | - | |
9162 | 9163 | | |
9163 | 9164 | | |
9164 | 9165 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3175 | 3175 | | |
3176 | 3176 | | |
3177 | 3177 | | |
3178 | | - | |
3179 | | - | |
| 3178 | + | |
| 3179 | + | |
3180 | 3180 | | |
3181 | 3181 | | |
3182 | 3182 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
| 204 | + | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
0 commit comments