GitHub user xushiyan created a discussion: Utilities using jcommander for 
boolean argument can be misleading

When people use Hudi utilities, many of them are not aware of 
`--a-boolean-flag` being present means `true`, and by following other args' 
pattern, they tend to set `--a-boolean-flag true` which resulted in 

```
Exception in thread "main" 
org.apache.hudi.com.beust.jcommander.ParameterException: Was passed main 
parameter 'true' but no main parameter was defined in your arg class
```

To improve this experience, we should allow both ways to set a boolean arg. 
People should be able to 

- omit or present a bool flag, omitting means using default value (can be true 
or false), present means true
- setting a true or false explicitly overwrites the default

To go further, any boolean arg used by utilities should be changed to default 
false. This may lead to breaking some usage, but it's a necessary step to align 
the expectations.

GitHub link: https://github.com/apache/hudi/discussions/13845

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to