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

   ### What changes were proposed in this pull request?
   The grammar accepts constraint specifications (PRIMARY KEY, UNIQUE, CHECK, 
FOREIGN KEY) in CREATE TABLE AS SELECT and REPLACE TABLE AS SELECT, but the 
execution layer silently drops them. Neither the ANSI SQL standard nor 
PostgreSQL supports this syntax - the SQL standard makes table element lists 
and AS subquery clauses mutually exclusive. Block this at the parser level, 
consistent with existing CTAS/RTAS checks for schema columns and partition 
column types.
   
   
   ### Why are the changes needed?
   Explicitly throw exception for an unsupported case for clarity
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   unit test
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Co-Authored-By: Claude Opus 4.6 <[email protected]>


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