You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "eugenegujing (via GitHub)" <gi...@apache.org> on 2026/04/17 08:55:18 UTC

[PR] feat: add ECDF plot visualization operator [texera]

eugenegujing opened a new pull request, #4406:
URL: https://github.com/apache/texera/pull/4406

   PR Description
   
   ## Purpose 
   
   Adds a new **Empirical Cumulative Distribution Function (ECDF)** plot operator to the Statistical Visualization group, letting users visualize the cumulative distribution of a numeric column and easily compare distributions across groups.
   
   ## Summary 
   - New operator `ECDFPlotOpDesc` under `operator/visualization/ecdfPlot/`, rendered via `plotly.express.ecdf`. 
   
   - Configurable fields: 
     - **Value Column** (required, numeric): column to compute ECDF on 
     - **Color Column** (optional): group and color lines by category 
     - **SeparateBy Column** (optional): split plot into facets 
     - **Y Axis Mode**: `probability` / `count` / `sum` 
     - **CDF Mode**: `standard` / `reversed` / `complementary` 
     - **Orientation**: `vertical` / `horizontal` 
     - **Show Markers / Show Lines** toggles 
     - **Marginal Plot**: `""` / `histogram` / `rug` 
   - Registered in `LogicalOp.scala` as the `ECDFPlot` operator type. 
   - Added operator icon `frontend/src/assets/operator_images/ECDFPlot.png`. 
   - User-provided enum fields (`cdfMode`, `orientation`, `marginal`) use `EncodableString` so generated Python safely passes `PythonCodeRawInvalidTextSpec`. 
   - Unit tests in `ECDFPlotOpDescSpec` covering the empty-value assertion and the generated figure with all optional parameters.
   
   ## Test
   - [x] `sbt scalafmtCheckAll` passes
   - [x] `sbt "scalafixAll --check"` passes
   - [x] `sbt "WorkflowOperator/testOnly
           org.apache.texera.amber.operator.visualization.ecdfPlot.ECDFPlotOpDescSpec
           org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec"`
           — all tests pass (4/4), 110/110 raw-invalid OK, 110/110 py_compile OK
   - [x] Manually tested end-to-end in the UI with CSV source → ECDF Plot operator; verified the rendered plot in the result panel for all combinations of color/facet/CDF mode/orientation/marginal options.
   
   ## Screenshots
   <img width="3529" height="1962" alt="image" src="https://github.com/user-attachments/assets/44392eaa-e6bb-48ee-80dc-a4c128425255" />
   [ecdf_demo.csv](https://github.com/user-attachments/files/26813799/ecdf_demo.csv)
   


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "eugenegujing (via GitHub)" <gi...@apache.org>.
eugenegujing commented on PR #4406:
URL: https://github.com/apache/texera/pull/4406#issuecomment-4277785993

   @mengw15 I have finished what Grace asked me to revise. Could you please review it for finalization?


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "gracecluvohio (via GitHub)" <gi...@apache.org>.
gracecluvohio commented on code in PR #4406:
URL: https://github.com/apache/texera/pull/4406#discussion_r3104568539


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")

Review Comment:
   Could we add a space: "Separate By Column"? It would look better on the UI in my opinion.



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into facets.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription("Standard, reversed, or complementary ECDF mode.")

Review Comment:
   It'd be nice to specify what each mode means for UX. 



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into facets.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription("Standard, reversed, or complementary ECDF mode.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Whether to display sample markers on the ECDF trace.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "true")
+  @JsonSchemaTitle("Show Lines")
+  @JsonPropertyDescription("Whether to display connecting ECDF lines.")

Review Comment:
   May be good to add a note that it is forced to show lines if "Show Markers" is unchecked.
   
   Also maybe simplify the description to "whether to draw lines between markers". 



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into facets.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription("Standard, reversed, or complementary ECDF mode.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Whether to display sample markers on the ECDF trace.")

Review Comment:
   I think "ECDF trace" is a bit technical; "line" or "plot" would be better in my opinion. 



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,190 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("SeparateBy Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into facets.")

Review Comment:
   "Facets" seems a bit abstract; maybe "subplots" would be better?



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "eugenegujing (via GitHub)" <gi...@apache.org>.
eugenegujing commented on code in PR #4406:
URL: https://github.com/apache/texera/pull/4406#discussion_r3113324478


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Separate By Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into subplots.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription(
+    "'standard' shows P(X ≤ x), 'reversed' shows P(X ≥ x), " +
+      "'complementary' shows 1 - P(X ≤ x)."
+  )
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Display sample markers on the ECDF line.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "")
+  @JsonSchemaTitle("Marginal Plot")
+  @JsonPropertyDescription("Optional marginal plot to display alongside the ECDF.")
+  @JsonSchemaInject(json = """{ "enum": ["", "histogram", "rug"], "default": "" }""")

Review Comment:
   The "" here is on purpose, and I delete the showLines function because of its useless functionality. I might not delete the function completely so it causes errors. I will revise it later today and run the tests again.



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4406:
URL: https://github.com/apache/texera/pull/4406#discussion_r3113303815


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Separate By Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into subplots.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription(
+    "'standard' shows P(X ≤ x), 'reversed' shows P(X ≥ x), " +
+      "'complementary' shows 1 - P(X ≤ x)."
+  )
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Display sample markers on the ECDF line.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "")
+  @JsonSchemaTitle("Marginal Plot")
+  @JsonPropertyDescription("Optional marginal plot to display alongside the ECDF.")
+  @JsonSchemaInject(json = """{ "enum": ["", "histogram", "rug"], "default": "" }""")

Review Comment:
   this "" here is on purpose or is this a typo? 



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4406:
URL: https://github.com/apache/texera/pull/4406#discussion_r3113351005


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Separate By Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into subplots.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription(
+    "'standard' shows P(X ≤ x), 'reversed' shows P(X ≥ x), " +
+      "'complementary' shows 1 - P(X ≤ x)."
+  )
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Display sample markers on the ECDF line.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "")
+  @JsonSchemaTitle("Marginal Plot")
+  @JsonPropertyDescription("Optional marginal plot to display alongside the ECDF.")
+  @JsonSchemaInject(json = """{ "enum": ["", "histogram", "rug"], "default": "" }""")

Review Comment:
   is "" here mean default? Can we give it a name?



##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Separate By Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into subplots.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription(
+    "'standard' shows P(X ≤ x), 'reversed' shows P(X ≥ x), " +
+      "'complementary' shows 1 - P(X ≤ x)."
+  )
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Display sample markers on the ECDF line.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "")
+  @JsonSchemaTitle("Marginal Plot")
+  @JsonPropertyDescription("Optional marginal plot to display alongside the ECDF.")
+  @JsonSchemaInject(json = """{ "enum": ["", "histogram", "rug"], "default": "" }""")

Review Comment:
   is "" here means default? Can we give it a name?



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #4406:
URL: https://github.com/apache/texera/pull/4406


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on PR #4406:
URL: https://github.com/apache/texera/pull/4406#issuecomment-4283693044

   remember to run scalafmtAll for formatting checks.


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on PR #4406:
URL: https://github.com/apache/texera/pull/4406#issuecomment-4278342433

   > @mengw15 I have finished what Grace asked me to revise. Could you please review it for finalization?
   
   Please make sure all conversations are marked resolved if you resolve them, and @gracecluvohio please take a look of the changes. I will review after Grace's approval


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #4406:
URL: https://github.com/apache/texera/pull/4406#issuecomment-4269599524

   @gracecluvohio please review it.  After that, @mengw15 can review it as a committer.


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4406:
URL: https://github.com/apache/texera/pull/4406#discussion_r3113092982


##########
common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDesc.scala:
##########
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import com.fasterxml.jackson.annotation.{JsonProperty, JsonPropertyDescription}
+import com.kjetland.jackson.jsonSchema.annotations.{JsonSchemaInject, JsonSchemaTitle}
+import org.apache.texera.amber.core.tuple.{AttributeType, Schema}
+import org.apache.texera.amber.core.workflow.OutputPort.OutputMode
+import org.apache.texera.amber.core.workflow.{InputPort, OutputPort, PortIdentity}
+import org.apache.texera.amber.operator.PythonOperatorDescriptor
+import org.apache.texera.amber.operator.metadata.annotations.AutofillAttributeName
+import org.apache.texera.amber.operator.metadata.{OperatorGroupConstants, OperatorInfo}
+import org.apache.texera.amber.pybuilder.PyStringTypes.EncodableString
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder
+import org.apache.texera.amber.pybuilder.PythonTemplateBuilder.PythonTemplateBuilderStringContext
+
+import javax.validation.constraints.NotNull
+
+@JsonSchemaInject(
+  json = """{"attributeTypeRules":{"valueColumn":{"enum":["integer","long","double"]}}}"""
+)
+class ECDFPlotOpDesc extends PythonOperatorDescriptor {
+
+  @JsonProperty(required = true)
+  @JsonSchemaTitle("Value Column")
+  @JsonPropertyDescription("Numeric column used to compute the empirical cumulative distribution.")
+  @AutofillAttributeName
+  @NotNull(message = "Value column cannot be empty")
+  var valueColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Color Column")
+  @JsonPropertyDescription("Optional column for coloring ECDF lines by group.")
+  @AutofillAttributeName
+  var colorColumn: EncodableString = ""
+
+  @JsonProperty(required = false)
+  @JsonSchemaTitle("Separate By Column")
+  @JsonPropertyDescription("Optional column for splitting ECDF plots into subplots.")
+  @AutofillAttributeName
+  var separateBy: EncodableString = ""
+
+  @JsonProperty(required = false, defaultValue = "probability")
+  @JsonSchemaTitle("Y Axis Mode")
+  @JsonPropertyDescription("Display cumulative probability, raw count, or cumulative sum.")
+  @JsonSchemaInject(
+    json = """{ "enum": ["probability", "count", "sum"], "default": "probability" }"""
+  )
+  var yAxisMode: String = "probability"
+
+  @JsonProperty(required = false, defaultValue = "standard")
+  @JsonSchemaTitle("CDF Mode")
+  @JsonPropertyDescription(
+    "'standard' shows P(X ≤ x), 'reversed' shows P(X ≥ x), " +
+      "'complementary' shows 1 - P(X ≤ x)."
+  )
+  @JsonSchemaInject(
+    json = """{ "enum": ["standard", "reversed", "complementary"], "default": "standard" }"""
+  )
+  var cdfMode: EncodableString = "standard"
+
+  @JsonProperty(required = false, defaultValue = "vertical")
+  @JsonSchemaTitle("Orientation")
+  @JsonPropertyDescription("Plot ECDF vertically or horizontally.")
+  @JsonSchemaInject(json = """{ "enum": ["vertical", "horizontal"], "default": "vertical" }""")
+  var orientation: EncodableString = "vertical"
+
+  @JsonProperty(required = false, defaultValue = "false")
+  @JsonSchemaTitle("Show Markers")
+  @JsonPropertyDescription("Display sample markers on the ECDF line.")
+  var showMarkers: Boolean = false
+
+  @JsonProperty(required = false, defaultValue = "")
+  @JsonSchemaTitle("Marginal Plot")
+  @JsonPropertyDescription("Optional marginal plot to display alongside the ECDF.")
+  @JsonSchemaInject(json = """{ "enum": ["", "histogram", "rug"], "default": "" }""")
+  var marginal: EncodableString = ""
+
+  override def operatorInfo: OperatorInfo =
+    OperatorInfo(
+      "Empirical Cumulative Distribution Plot",
+      "Visualize the empirical cumulative distribution of a numeric column.",
+      OperatorGroupConstants.VISUALIZATION_STATISTICAL_GROUP,
+      inputPorts = List(InputPort()),
+      outputPorts = List(OutputPort(mode = OutputMode.SINGLE_SNAPSHOT))
+    )

Review Comment:
   for this function, could you check how other visualization operators have, try to make this consistent.
   
   example:
   
   ```
   override def operatorInfo: OperatorInfo =
       OperatorInfo.forVisualization(
         "Pie Chart",
         "Visualize data in a Pie Chart",
         OperatorGroupConstants.VISUALIZATION_BASIC_GROUP
       )
   ```



##########
common/workflow-operator/src/test/scala/org/apache/texera/amber/operator/visualization/ecdfPlot/ECDFPlotOpDescSpec.scala:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.operator.visualization.ecdfPlot
+
+import org.scalatest.BeforeAndAfter
+import org.scalatest.flatspec.AnyFlatSpec
+
+class ECDFPlotOpDescSpec extends AnyFlatSpec with BeforeAndAfter {
+
+  var opDesc: ECDFPlotOpDesc = _
+
+  before {
+    opDesc = new ECDFPlotOpDesc()
+  }
+
+  it should "throw assertion error if value column is empty" in {
+    assertThrows[AssertionError] {
+      opDesc.manipulateTable()
+    }
+  }
+
+  it should "generate a plotly ecdf figure with optional parameters" in {
+    opDesc.valueColumn = "score"
+    opDesc.colorColumn = "group"
+    opDesc.separateBy = "category"
+    opDesc.yAxisMode = "count"
+    opDesc.cdfMode = "reversed"
+    opDesc.orientation = "horizontal"
+    opDesc.showMarkers = true
+    opDesc.showLines = false

Review Comment:
   I didn't see "showLines" in ECDFPlotOpDesc's properties, is this an error?



-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "gracecluvohio (via GitHub)" <gi...@apache.org>.
gracecluvohio commented on PR #4406:
URL: https://github.com/apache/texera/pull/4406#issuecomment-4282815951

   LGTM! @mengw15 please take a look.


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add ECDF plot visualization operator [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on PR #4406:
URL: https://github.com/apache/texera/pull/4406#issuecomment-4283815510

   Please update the link of the test csv file in the PR description, it seems not working right now


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org