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

   ### What changes were proposed in this pull request?
   
   Rename the legacy error condition `_LEGACY_ERROR_TEMP_1058` to
   `CREATE_TABLE_WITH_BOTH_PROVIDER_AND_SERDE`, with SQLSTATE `42908`.
   
   ### Why are the changes needed?
   
   The error-conditions README disallows new `_LEGACY_ERROR_TEMP_*` entries and 
asks
   existing ones to be resolved. This resolves one of them.
   
   The error is raised by `ResolveSessionCatalog` when a CREATE TABLE plan 
carries both a
   `USING <provider>` and a serde clause. It is an analysis-time 
`AnalysisException`. Note
   the parser (`AstBuilder.visitCreateTable`) already rejects `CREATE TABLE ... 
USING ...
   ROW FORMAT/STORED AS ...` up front, so this is a defensive check that is not 
reachable
   through SQL.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added a `checkError` test in `QueryCompilationErrorsSuite` that invokes the 
error
   factory directly (the SQL path is guarded by the parser) and asserts the
   `CREATE_TABLE_WITH_BOTH_PROVIDER_AND_SERDE` condition. `build/sbt 
"core/testOnly
   org.apache.spark.SparkThrowableSuite"` passes.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   


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