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


##########
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:
   Existing Histogram operators can store an empty marginal value. The property 
editor checks that the saved value is present in this enum, so those workflows 
become invalid even though code generation still treats empty as no marginal 
plot. Please keep empty as a legacy value or migrate it to none before 
validation, with a saved workflow test.



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