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

   ### What changes were proposed in this pull request?
   
   Rename the legacy error condition `_LEGACY_ERROR_TEMP_1068` to the new named 
condition `CANNOT_USE_RESERVED_DATABASE_AS_CURRENT` (SQLSTATE `42939`). It is 
raised when a session sets the current database to the global temporary view 
database, e.g. `USE global_temp`.
   
   ### 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 (part of SPARK-37935).
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The condition becomes `CANNOT_USE_RESERVED_DATABASE_AS_CURRENT`, and 
the message is reworded and now quotes the database name with backticks, e.g. 
``Cannot use `global_temp` as the current database because the name is reserved 
for system use. To access global temporary views, use a qualified name, e.g. 
SELECT * FROM `global_temp`.viewName.``
   
   ### How was this patch tested?
   
   Converted the message assertion in `GlobalTempViewSuite` to `checkError`. 
`SparkThrowableSuite` and `GlobalTempViewSuite` pass.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Co-authored with Claude 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