[SPARK-58283][SQL] Assign names to the error conditions _LEGACY_ERROR_TEMP_1138-1141#57456
Closed
LuciferYang wants to merge 1 commit into
Closed
[SPARK-58283][SQL] Assign names to the error conditions _LEGACY_ERROR_TEMP_1138-1141#57456LuciferYang wants to merge 1 commit into
LuciferYang wants to merge 1 commit into
Conversation
…_TEMP_1138-1141 Resolve four legacy error conditions raised while resolving a data source provider in `DataSource.lookupDataSource`, converting them to proper top-level names in `error-conditions.json`: - `_LEGACY_ERROR_TEMP_1138` -> `ORC_DATA_SOURCE_REQUIRES_HIVE_SUPPORT` (0A000) - `_LEGACY_ERROR_TEMP_1139` -> `AVRO_DATA_SOURCE_NOT_ENABLED` (42K02) - `_LEGACY_ERROR_TEMP_1140` -> `KAFKA_DATA_SOURCE_NOT_ENABLED` (42K02) - `_LEGACY_ERROR_TEMP_1141` -> `MULTIPLE_DATA_SOURCES` (42710) All four are user-facing `AnalysisException`s. They are kept as top-level names rather than folded into the existing `DATA_SOURCE_NOT_FOUND` / `MULTIPLE_XML_DATA_SOURCE`: the Avro/Kafka errors are thrown as `AnalysisException` (not the `SparkClassNotFoundException` of `DATA_SOURCE_NOT_FOUND`) and carry module-specific deployment guidance; the multiple-sources error mirrors the existing XML-specific one but for the generic path. The message text is preserved verbatim from the legacy entries. Existing `checkError` assertions are updated to the new condition names.
uros-b
approved these changes
Jul 23, 2026
Member
|
Thank you @LuciferYang! |
HyukjinKwon
approved these changes
Jul 24, 2026
LuciferYang
added a commit
that referenced
this pull request
Jul 24, 2026
…_TEMP_1138-1141 ### What changes were proposed in this pull request? Resolve four legacy error conditions raised while resolving a data source provider in `DataSource.lookupDataSource`, converting them to proper top-level names in `error-conditions.json`: - `_LEGACY_ERROR_TEMP_1138` → `ORC_DATA_SOURCE_REQUIRES_HIVE_SUPPORT` (`0A000`) - `_LEGACY_ERROR_TEMP_1139` → `AVRO_DATA_SOURCE_NOT_ENABLED` (`42K02`) - `_LEGACY_ERROR_TEMP_1140` → `KAFKA_DATA_SOURCE_NOT_ENABLED` (`42K02`) - `_LEGACY_ERROR_TEMP_1141` → `MULTIPLE_DATA_SOURCES` (`42710`) The message text is preserved verbatim from the legacy entries. ### Why are the changes needed? The error-conditions README disallows new `_LEGACY_ERROR_TEMP_*` entries and asks existing ones to be resolved. This resolves four of them. They are kept as top-level names rather than folded into the existing `DATA_SOURCE_NOT_FOUND` / `MULTIPLE_XML_DATA_SOURCE`: the Avro/Kafka errors are `AnalysisException`s (not the `SparkClassNotFoundException` of `DATA_SOURCE_NOT_FOUND`) and carry module-specific deployment guidance, and the multiple-sources error mirrors the existing XML-specific `MULTIPLE_XML_DATA_SOURCE` but for the generic provider path. ### Does this PR introduce _any_ user-facing change? No. Only the error condition names are assigned; the message text is unchanged. The `_LEGACY_ERROR_TEMP_*` names are not part of the public API. ### How was this patch tested? Updated the existing `checkError` assertions to the new condition names in `SQLQuerySuite`, `DDLSuite`, `ResolvedDataSourceSuite`, and `DDLSourceLoadSuite`. `build/sbt "sql/testOnly *ResolvedDataSourceSuite *DDLSourceLoadSuite *SQLQuerySuite *InMemoryCatalogedDDLSuite" "core/testOnly org.apache.spark.SparkThrowableSuite"` passes. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Closes #57456 from LuciferYang/assign-name-legacy-1138-1141. Authored-by: YangJie <yangjie01@baidu.com> Signed-off-by: yangjie01 <yangjie01@baidu.com> (cherry picked from commit 9ce65b2) Signed-off-by: yangjie01 <yangjie01@baidu.com>
Contributor
Author
Contributor
Author
|
Thank you @HyukjinKwon @uros-b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Resolve four legacy error conditions raised while resolving a data source provider in
DataSource.lookupDataSource, converting them to proper top-level names inerror-conditions.json:_LEGACY_ERROR_TEMP_1138→ORC_DATA_SOURCE_REQUIRES_HIVE_SUPPORT(0A000)_LEGACY_ERROR_TEMP_1139→AVRO_DATA_SOURCE_NOT_ENABLED(42K02)_LEGACY_ERROR_TEMP_1140→KAFKA_DATA_SOURCE_NOT_ENABLED(42K02)_LEGACY_ERROR_TEMP_1141→MULTIPLE_DATA_SOURCES(42710)The message text is preserved verbatim from the legacy entries.
Why are the changes needed?
The error-conditions README disallows new
_LEGACY_ERROR_TEMP_*entries and asks existing ones to be resolved. This resolves four of them.They are kept as top-level names rather than folded into the existing
DATA_SOURCE_NOT_FOUND/MULTIPLE_XML_DATA_SOURCE: the Avro/Kafka errors areAnalysisExceptions (not theSparkClassNotFoundExceptionofDATA_SOURCE_NOT_FOUND) and carry module-specific deployment guidance, and the multiple-sources error mirrors the existing XML-specificMULTIPLE_XML_DATA_SOURCEbut for the generic provider path.Does this PR introduce any user-facing change?
No. Only the error condition names are assigned; the message text is unchanged. The
_LEGACY_ERROR_TEMP_*names are not part of the public API.How was this patch tested?
Updated the existing
checkErrorassertions to the new condition names inSQLQuerySuite,DDLSuite,ResolvedDataSourceSuite, andDDLSourceLoadSuite.build/sbt "sql/testOnly *ResolvedDataSourceSuite *DDLSourceLoadSuite *SQLQuerySuite *InMemoryCatalogedDDLSuite" "core/testOnly org.apache.spark.SparkThrowableSuite"passes.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)