shaofengshi commented on PR #5058:
URL: https://github.com/apache/gravitino/pull/5058#issuecomment-2425746480

   Hello Justin, I'm in responsive of reviewing this PR (let's try to merge 
this one first, other two PRs will be reviewed after this).
   
   Overall the function is okay, but as it is the first version, I expect it be 
clear to understand and easy to use for user, besides, consistent with other 
clients like Java and Python client. Here are three comments I have now and 
suggest to optimize before mering into the code base:
   
   1. it says the command line style is (which is good I think):
   
   `gcli [metalake|catalog|schema|table] [list|details|create|delete|update] 
[options]`
   but it is a little flexible, seems you don't need to follow the style 
strictly, or using the "--command" option in any position, and also 
"--metalake" can also has the same effect as "--name", see: 
   ```
   # metalake details
   gcli details
   
   # metalake list
   gcli list
   
   gcli metalake --command details --metalake metalake_demo
   gcli metalake --name metalake_demo details
   gcli details --name metalake_demo
   gcli details --metalake metalake_demo
   ```
   as the first version, I think we don't need to make it complex, using a 
clear pattern is better. So, can we just support a fixed pattern?
   
   2. In previou version, I refactored the Java client, one main change is to 
make the metalake name as a config parameter when initialize a client instance. 
This is to avoid typing metalake name repeatedly in all other places. Besides, 
people are more familar with "catalog.schema.table" converntion. So I think the 
CLI we should follow the same idea and design, this is to be consistent with 
Java and Python client.
   
   For example: 
   ```
   gcli metalake list --name metalake_demo
   gcli catalog list --name metalake_demo.catalog_iceberg
   gcli schema list --name metalake_demo.catalog.schema
   ```
   I hope it be:
   
   ```
   export GRAVITINO_METALAKE=metalake_demo
   gcli metalake list
   gcli catalog list --name catalog_iceberg
   gcli schema list --name catalog.schema
   ```
   
   3. Some of the options short-name is hard to remember and distinguish; like 
-C and -c, -R and -r, -U and -u, -f and -n; I'm not sure how many user will use 
the short-name, at the begining, I would suggest all using full-name; in the 
future, if needed we add the short-name. 
   ```
   Options
    -C,--create       create an entity
    -D,--details      list details about an entity
    -f,--name <arg>   full entity name (dot separated)
    -h,--help         command help information
    -L,--list         list entity children
    -r,--server       Gravitino server version
    -R,--delete       delete an entity
    -u,--url <arg>    Gravitino URL (default: http://localhost:8090)
    -U,--update       update an entity
    -v,--version      Gravitino client version
   ```
   


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

Reply via email to