You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ycli12 (via GitHub)" <gi...@apache.org> on 2026/03/09 03:37:06 UTC
[PR] [SPARK-54680][SQL] Rename TABLESAMPLE-related legacy error conditions to descriptive names [spark]
ycli12 opened a new pull request, #54681:
URL: https://github.com/apache/spark/pull/54681
### What changes were proposed in this pull request?
Rename the following legacy error conditions in the SQL parser to proper descriptive names and add SQL states:
| Legacy Name | New Name | sqlState | Description |
|---|---|---|---|
| `_LEGACY_ERROR_TEMP_0014` | `TABLESAMPLE_EMPTY_INPUT` | `42601` | TABLESAMPLE clause with empty inputs |
| `_LEGACY_ERROR_TEMP_0015` | `UNSUPPORTED_TABLESAMPLE_METHOD` | `0A000` | Unsupported TABLESAMPLE method (e.g., BUCKET x OUT OF y ON colname) |
| `_LEGACY_ERROR_TEMP_0016` | `INVALID_BYTE_LENGTH_LITERAL` | `42604` | Invalid byte length literal in TABLESAMPLE |
### Why are the changes needed?
This is part of the ongoing effort to replace legacy temporary error condition names with proper, descriptive names (tracked across SPARK-55822, SPARK-55823, SPARK-55824, SPARK-55825, SPARK-55826, etc.). Proper error condition names improve error readability and debugging experience for users.
SQL states are assigned following the existing conventions:
- `42601` - Syntax error (invalid syntax usage)
- `0A000` - Feature not supported
- `42604` - Invalid literal value
### Does this PR introduce _any_ user-facing change?
Yes. The error class names change from temporary legacy names to descriptive names, and SQL states are now included in the error responses. The error messages themselves remain unchanged.
### How was this patch tested?
Existing unit tests in `PlanParserSuite` updated to reference the new error condition names. All 3 test cases for `_LEGACY_ERROR_TEMP_0015` (`UNSUPPORTED_TABLESAMPLE_METHOD`) are updated.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #54680
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-54680][SQL] Rename TABLESAMPLE-related legacy error conditions to descriptive names [spark]
Posted by "ycli12 (via GitHub)" <gi...@apache.org>.
ycli12 closed pull request #54681: [SPARK-54680][SQL] Rename TABLESAMPLE-related legacy error conditions to descriptive names
URL: https://github.com/apache/spark/pull/54681
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org