LuciferYang opened a new pull request, #57456:
URL: https://github.com/apache/spark/pull/57456

   ### 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)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to