yaooqinn commented on issue #26775: [SPARK-30018][SQL] Support ALTER DATABASE 
SET OWNER syntax
URL: https://github.com/apache/spark/pull/26775#issuecomment-562597983
 
 
   ### Code path for now:
   ```
   [[CreateNamespaceStatement]]
       users can specify `comment` `location`
       users can not sepcify `ownerName` `ownerType`
   
       -> [[CreateDatabaseCommand]]
       We shall throw exception when meet user specified `ownerName` `ownerType`
       [[ResolveSessionCatalog]] will convert `comment` `location` to db fields
       [[HiveClientImpl]] will gather `ownerName` `ownerType`
       
       -> [[CreateNamespace]]
       we shall throw exception when meet user specified `ownerName` `ownerType`
          -> [[CreateNamespaceExec]]
          all propeties get here, no `ownerName` `ownerType` guaranteed
          if users use built in catalog
             [[V2SessionCatalog]] will convert `comment` `location` to db fields
             [[HiveClientImpl]] will gather `ownerName` `ownerType`
          if users use a external [[DelegatingCatalogExtension]]
             users need to care how to create `ownerName` `ownerType` or do we 
use spark user here?
   
   [[AlterNamespaceSetPropertiesStatement]]
   we shall throw exception when meet user specified `ownerName` `ownerType` 
`comment`(?) `location` before transform to
       -> [[AlterNamespaceSetProperties]]
       -> [[AlterDatabasePropertiesCommand]]
   
   then, if users want to change these, use 
[[AlterNamespaceSetLocationStatement]] and [[AlterNamespaceSetOwner]]
   ```
   
   Shall we expose a api in [[SupportsNamespace]] to deal with ownership staff? 
Then we need not to care what the underlying catalog delegation it is. We 
handle these in [[HiveClientImpl]] for now, it seems not a good solution.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to