Vamsi-klu opened a new pull request, #58192:
URL: https://github.com/apache/spark/pull/58192

   ### What changes were proposed in this pull request?
   
   Assign a stable name to `_LEGACY_ERROR_TEMP_1052` (ADD COLUMN ... NOT NULL 
on v1 tables).
   
   - Catalog: delete `_LEGACY_ERROR_TEMP_1052`, add 
`ADD_COLUMN_NOT_NULL_UNSUPPORTED` with SQLSTATE `0A000` and the same message: 
`ADD COLUMN with v1 tables cannot specify NOT NULL.`
   - `QueryCompilationErrors.addColumnWithV1TableCannotSpecifyNotNullError` now 
uses that condition. The helper name and `ResolveSessionCatalog` call site are 
unchanged.
   - Add one `checkError` in `QueryCompilationErrorsSuite` for `ALTER TABLE t 
ADD COLUMN c INT NOT NULL` on a `USING parquet` table.
   
   This does not reuse `UNSUPPORTED_FEATURE.TABLE_OPERATION`. Closed 
apache/spark#57364 did that and changed the user text. This PR is a catalog 
rename only.
   
   ### Why are the changes needed?
   
   https://issues.apache.org/jira/browse/SPARK-58212
   
   Sub-task of SPARK-37935. TEMP ids are not a stable public condition. The id 
is still in current `master`. The earlier close of apache/spark#57364 ("another 
pr has completed this work") was incorrect.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Clients that match `_LEGACY_ERROR_TEMP_1052` by condition name will 
need the new name. The message text is unchanged. Named conditions now report 
SQLSTATE `0A000` (TEMP entries omit it).
   
   ### How was this patch tested?
   
   - `build/sbt "sql/testOnly 
org.apache.spark.sql.errors.QueryCompilationErrorsSuite -- -z 
ADD_COLUMN_NOT_NULL_UNSUPPORTED"`
   - `build/sbt "core/testOnly org.apache.spark.SparkThrowableSuite -- -z 
\"Error conditions are correctly formatted\""`
   
   No SQL golden files. No Hive suite.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Cursor Grok 4.6
   
   cc @uros-b @MaxGekk
   


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