AnzhiZhang commented on code in PR #4006:
URL: https://github.com/apache/texera/pull/4006#discussion_r2477178598
##########
common/workflow-operator/src/main/scala/org/apache/amber/operator/visualization/dumbbellPlot/DumbbellPlotOpDesc.scala:
##########
@@ -46,34 +47,39 @@ class DumbbellPlotOpDesc extends PythonOperatorDescriptor {
@JsonSchemaTitle("Category Column Name")
@JsonPropertyDescription("the name of the category column")
@AutofillAttributeName
+ @NotNull(message = "Category Column Name cannot be empty")
var categoryColumnName: String = ""
@JsonProperty(value = "dumbbellStartValue", required = true)
@JsonSchemaTitle("Dumbbell Start Value")
@JsonPropertyDescription("the start point value of each dumbbell")
+ @NotBlank(message = "Dumbbell Start Value cannot be empty")
Review Comment:
Here I quote the docstring from two annotations:
`@NotNull`: The annotated element must not be null. Accepts any type.
`@NotBlank`: The annotated element must not be null and must contain at
least one non-whitespace character. Accepts CharSequence.
`@NotBlank` is intended for strings. When using `NotNull`, there is also a
`@AutofillAttributeName`, so the attribute is a selection from an options list.
`@NotNull` will be enough for that in semantics. `@NotBlank` is used on
user-manually input texts.
More detailed difference is explained here
https://github.com/apache/texera/issues/3692#issue-3350539271. We could also
have `@NotBlank` for all strings for consistency and potential future changes.
--
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]