jackye1995 commented on pull request #3177:
URL: https://github.com/apache/iceberg/pull/3177#issuecomment-930702601


   @nssalian agree, namespace property seems to be the most valuable thing to 
add as the first step. To achieve that, we basically need a namespace table. 
This PR already shows its schema design:
   
   ```
           NamespacesRecord namespacesRecord = new NamespacesRecord();
   
           namespacesRecord.setNamespaceName(namespaceName);
           Timestamp timestamp = new Timestamp(System.currentTimeMillis());
           namespacesRecord.setCreatedTimestamp(timestamp);
           namespacesRecord.setLastUpdatedTimestamp(timestamp);
   
           // TODO: set up permissions properly
           namespacesRecord.setOwnerGroup("test_group");
           namespacesRecord.setCreatedByUser("test_user");
           namespacesRecord.setLastUpdatedByUser("test_user");
   
           namespacesRecord.setLocation(location.toASCIIString());
           
namespacesRecord.setProperties(convertMapToJSONString(namespaceProperties));
   ```
   
   Which looks mostly good to me, it's just a mapping of name -> location + 
properties.
   
   Because it's a SQL table, we can also support nested namespace.
   
   I think we can treat things like timestamp and owner as just a part of the 
table/namespace properties, an external user of `JdbcCatalog` can always set 
them if necessary, as along as they can retrieve this information later through 
Iceberg API. There is no reason to add special handling for that just to keep 
things generic, because there is no "owner" concept in Iceberg yet, and we 
should not introduce it too quickly.
   
   For the use of `jooq`, my perspective is that the namespace table will be 
very simple, and I don't see much value in introducing a full suite of 
dependencies plus generated code just for that.
   
   For the functionalities around creating bucket when creating namespace with 
location, it feels a bit hacky to me. A person who has create namespace 
permission at catalog user level might not have create S3 bucket permission at 
cloud permission level. It also makes the `createNamespace` method hard to 
revert when creation fails, you will also need delete bucket permission to 
revert the change, which makes the story much more complicated. So I would 
suggest hold on that feature.


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