arvindKandpal-ksolves commented on PR #4922:
URL: https://github.com/apache/cassandra/pull/4922#issuecomment-4934291545

   I just tested this locally, and you are totally right about the collision. 
If a user actually has a keyspace named `keyspace`, Picocli intercepts it as 
the new subcommand and breaks the legacy behavior. 
   
   Here is what I reproduced:
   
   ```sql
   cqlsh> CREATE KEYSPACE "keyspace" WITH replication = {'class': 
'SimpleStrategy', 'replication_factor': 1};
   cqlsh> CREATE TABLE "keyspace".my_table (id int PRIMARY KEY);
   ```
   
   ```Bash
   $ bin/nodetool compact keyspace my_table
   nodetool: Keyspace [my_table] does not exist.
   ```
   
   Since the keyspace keyword gets swallowed as a subcommand, Picocli ends up 
treating my_table as the keyspace name.
   
   What is the preferred way to fix this CLI ambiguity in our codebase? Should 
I add a custom pre-parsing check (maybe in NodeTool.java) before passing the 
args to Picocli, so we can route these specific edge cases back to the legacy 
behavior?


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