jerryshao commented on code in PR #9960:
URL: https://github.com/apache/gravitino/pull/9960#discussion_r2910651247
##########
api/src/main/java/org/apache/gravitino/job/JobTemplate.java:
##########
@@ -73,7 +73,25 @@ public enum JobType {
/** The executable path for the job template. */
protected final String executable;
- /** The list of arguments for the job template. */
+ /**
+ * The list of arguments for the job template.
+ *
+ * <p>Arguments can be marked as optional by prefixing them with {@code ?}.
An optional argument
+ * is filtered out at job execution time if its effective value is
considered empty. A value is
+ * empty when it is {@code null}, an empty string, whitespace-only, or an
unreplaced placeholder
+ * (i.e., the key was absent from the job configuration).
+ *
+ * <p>Two consecutive optional arguments can form a flag-value pair. When
the flag (the first
Review Comment:
Can we simplify the rule as all the arguments starting with "?" can be
neglected? Let users to guarantee with semantic correctness.
The current way is a little complex; users need to understand different
patterns/usages for "?". It increases the educational overhead.
--
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]