[ 
https://issues.apache.org/jira/browse/SPARK-54541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abinaya Jayaprakasam updated SPARK-54541:
-----------------------------------------
    Description: 
 *Description*

`_LEGACY_ERROR_TEMP_1007` is used when users attempt to write to temporary 
views using DataFrameWriter V2 API (e.g., `.writeTo("temp_view").append()`).

This is a frequently encountered error that lacks proper standardization.

*Current Issues*

1. Non-descriptive name:`_LEGACY_ERROR_TEMP_1007` provides no semantic meaning
2. Missing SQL state:Critical for JDBC/ODBC clients and programmatic error 
handling
3. Production impact:Makes error handling difficult for enterprise applications 
and monitoring tools

*Proposed Changes*

1. Rename:`_LEGACY_ERROR_TEMP_1007` → `TEMP_VIEW_WRITE_NOT_ALLOWED` 
(self-documenting)
2. Add sqlState:`42623` (consistent with other write constraint violations per 
SQL:2016)
3. Update:References in `QueryCompilationErrors.scala` and modernize tests

*Benefits*
 * Better programmatic error handling
 * JDBC/ODBC compatibility for external tools
 * Improved debugging and monitoring



 

  was:
_LEGACY_ERROR_TEMP_1007 is used for the error "Cannot write into temp view 
as it's not a data source v2 relation" but lacks a descriptive error name 
and sqlState.

This is a frequent error that needs standardization.

Proposed changes:
1. Rename to: TEMP_VIEW_WRITE_NOT_ALLOWED
2. Add sqlState: 42623 (consistent with other write operation errors)
3. Update references in QueryCompilationErrors.scala

 


> Rename _LEGACY_ERROR_TEMP_1007 and add sqlState
> -----------------------------------------------
>
>                 Key: SPARK-54541
>                 URL: https://issues.apache.org/jira/browse/SPARK-54541
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Abinaya Jayaprakasam
>            Priority: Minor
>              Labels: pull-request-available
>
>  *Description*
> `_LEGACY_ERROR_TEMP_1007` is used when users attempt to write to temporary 
> views using DataFrameWriter V2 API (e.g., `.writeTo("temp_view").append()`).
> This is a frequently encountered error that lacks proper standardization.
> *Current Issues*
> 1. Non-descriptive name:`_LEGACY_ERROR_TEMP_1007` provides no semantic meaning
> 2. Missing SQL state:Critical for JDBC/ODBC clients and programmatic error 
> handling
> 3. Production impact:Makes error handling difficult for enterprise 
> applications and monitoring tools
> *Proposed Changes*
> 1. Rename:`_LEGACY_ERROR_TEMP_1007` → `TEMP_VIEW_WRITE_NOT_ALLOWED` 
> (self-documenting)
> 2. Add sqlState:`42623` (consistent with other write constraint violations 
> per SQL:2016)
> 3. Update:References in `QueryCompilationErrors.scala` and modernize tests
> *Benefits*
>  * Better programmatic error handling
>  * JDBC/ODBC compatibility for external tools
>  * Improved debugging and monitoring
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to