huaxingao opened a new pull request #34857:
URL: https://github.com/apache/spark/pull/34857


   
   
   ### What changes were proposed in this pull request?
   fixed a few problems:
   1. addressed this 
[comment](https://github.com/apache/spark/pull/34060#discussion_r765992537)
   2. combined several `xxxOnlySupportedWithV2TableError`
   3. in CTAS and RTAS, the `if isSessionCatalog(catalog)` should not be on the 
pattern, it should be `if (isSessionCatalog(catalog) && 
!isV2Provider(provider))`. Otherwise, `c.partitioning ++ 
c.tableSpec.bucketSpec.map(_.asTransform)` is not done for non SessionCatalog 
case.
   I tried this  `c.partitioning ++ c.tableSpec.bucketSpec.map(_.asTransform)` 
inside `AstBuilder` but it failed [here]( 
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala#L850)
 so I kept this in `ResolveSessionCatalog`
   
   
   ### Why are the changes needed?
   code cleaning up and bug fixing
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Existing tests
   


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