yihua opened a new pull request, #6377:
URL: https://github.com/apache/hudi/pull/6377

   ### Change Logs
   
   This PR improves usability of upgrade/downgrade commands in Hudi CLI by the 
following:
   - For the upgrade command (`upgrade table`), if `--toVersion` is not 
specified, the current/latest table version is used.
   - Adds support for numeric table version.  If the numeric table version is 
provided through `--toVersion`, it is converted to the `HoodieTableVersion` 
enum name internally, e.g., `2` -> `TWO`.
   
   This PR adds new tests for the conversion of the input version option to the 
desired version name.
   
   ### Impact
   
   Only affecting the upgrade and downgrade commands in Hudi CLI.
   
   **Risk level: low**
   Tested the following CLI commands and they all work as expected:
   - `upgrade table --sparkMaster local[2]`: `Hoodie table upgraded/downgraded 
to FIVE`
   - `downgrade table --toVersion 2 --sparkMaster local[2]`: `upgrade table 
--toVersion FIVE --sparkMaster local[2]`
   - `upgrade table --toVersion FIVE --sparkMaster local[2]`: `Hoodie table 
upgraded/downgraded to FIVE`
   - `downgrade table --toVersion TWO --sparkMaster local[2]`: `Hoodie table 
upgraded/downgraded to TWO`
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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