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

   ### What changes were proposed in this pull request?
   
   Backport of #58153  to branch-4.x.
   
   It adds optional clauses to `CREATE`/`REPLACE TABLE` and their `AS SELECT` 
forms: `[DISTRIBUTED BY PARTITION] [[LOCALLY] ORDERED BY (...) | UNORDERED]`. 
The request reaches the catalog on `TableInfo`. `Table` exposes 
`writeDistributionMode()` and `writeOrdering()`, and `SHOW CREATE TABLE` and 
`DESCRIBE TABLE EXTENDED` read them back.
   
   The cherry-pick conflicted only in the `org.apache.spark.sql.catalyst.util` 
import line of `DataSourceV2Strategy.scala`. Master's list imports 
`MetadataColumnHelper`, which that file does not use and branch-4.x does not 
import. The branch's list is kept with `WriteDistributionAndOrdering` added. 
Otherwise the change is the same as on master.
   
   ### Why are the changes needed?
   
   Same as #58153.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, as described in #58153: the new optional clauses, four new non-reserved 
keywords (`DISTRIBUTED`, `LOCALLY`, `ORDERED`, `UNORDERED`), and new error 
conditions. Statements that do not use the clauses behave as before.
   
   ### How was this patch tested?
   
   The tests added in #58153 pass on branch-4.x with JDK 17.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5 was used for this backport: 
cherry-pick, conflict resolution, test runs)
   


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