Akash3121 commented on code in PR #11154:
URL: https://github.com/apache/paimon/pull/11154#discussion_r4579251258


##########
paimon-python/pypaimon/cli/cli_table.py:
##########
@@ -1446,7 +1595,7 @@ def add_table_subcommands(table_parser):
     )
     rollback_target = 
rollback_parser.add_mutually_exclusive_group(required=True)
     rollback_target.add_argument(
-        '--snapshot', type=int, default=None,
+        '--snapshot-id', type=int, default=None,

Review Comment:
   Unifying this option name with `--snapshot-id` used by `get`, `snapshot`, 
`list-manifests`, and `list-files` makes the CLI much more consistent, and 
`argparse` sets `args.snapshot_id` automatically.
    
    Two minor suggestions here:
    1. Keep `--snapshot` as a backward-compatible alias (`'--snapshot-id', 
'--snapshot'`) so existing scripts using `paimon table rollback ... --snapshot 
<id>` don't break.
    2. Could this also use `type=_positive_int` like the `--snapshot-id` option 
on `get` (line 1471), `snapshot` (line 1501), `list-manifests` (line 1531), and 
`list-files` (line 1564)?
    
    ```suggestion
            '--snapshot-id', '--snapshot', type=int, default=None,
    ```
   



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