kz930 commented on code in PR #7259:
URL: https://github.com/apache/texera/pull/7259#discussion_r3716147299


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/histogram/HistogramChartOpDesc.scala:
##########
@@ -51,10 +51,15 @@ class HistogramChartOpDesc extends PythonOperatorDescriptor 
{
   @AutofillAttributeName
   var separateBy: EncodableString = ""
 
-  @JsonProperty(required = false, defaultValue = "")
+  // `none` is our own sentinel, not a px value: it means omit the argument, 
the way
+  // ECDFPlot's marginal already works.
+  @JsonProperty(required = false, defaultValue = "none")
   @JsonSchemaTitle("Distribution Type")
-  @JsonPropertyDescription("Distribution type (rug, box, violin).")
-  var marginal: EncodableString = ""
+  @JsonPropertyDescription("Optional marginal plot to display alongside the 
histogram.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["none", "rug", "box", "violin", "histogram"], 
"default": "none" }"""

Review Comment:
   Dropped the none sentinel instead: the enum is now ["", "rug", "box", 
"violin", "histogram"], so a stored empty value stays legal with no migration, 
and HistogramChartOpDescSpec now covers both the schema enum and a Histogram 
saved with marginal: "".



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