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

   ### What changes were proposed in this pull request?
   
   Rename the legacy error condition `_LEGACY_ERROR_TEMP_1059` to
   `INVALID_FILE_FORMAT_FOR_STORED_AS`, with SQLSTATE `42601`.
   
   ### 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 uses 
`STORED AS
   <fileFormat>` with a file format that does not map to a known Hive SerDe, 
e.g.
   `CREATE TABLE t (c1 INT) STORED AS UNKNOWN_FORMAT`. It is an analysis-time
   `AnalysisException`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added a `checkError` test in `QueryCompilationErrorsSuite` that runs `CREATE 
TABLE ...
   STORED AS <unknown format>` and asserts the 
`INVALID_FILE_FORMAT_FOR_STORED_AS`
   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